doc: coding_guideline: Add a MISRA-C mandatory rule to Zephyr
This guideline seems to be missed during the Zephyr's code guideline creation. That is a good guideline that aims to address some problems like double free or freeing not allocated memory. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
70cd67579d
commit
14899616a3
1 changed files with 5 additions and 0 deletions
|
@ -761,6 +761,11 @@ severity and the equivlent rules from other standards for reference.
|
||||||
- All resources obtained dynamically by means of Standard Library functions shall be explicitly released
|
- All resources obtained dynamically by means of Standard Library functions shall be explicitly released
|
||||||
- N/A
|
- N/A
|
||||||
- `Rule 22.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_22_01.c>`_
|
- `Rule 22.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_22_01.c>`_
|
||||||
|
* - Rule 22.2
|
||||||
|
- Mandatory
|
||||||
|
- A block of memory shall only be freed if it was allocated by means of a Standard Library function
|
||||||
|
- N/A
|
||||||
|
- `Rule 22.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_22_02.c>`_
|
||||||
* - Rule 22.3
|
* - Rule 22.3
|
||||||
- Required
|
- Required
|
||||||
- The same file shall not be open for read and write access at the same time on different streams
|
- The same file shall not be open for read and write access at the same time on different streams
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue