CertCRecommendations-MEMΒΆ
Memory Management
Nested Rules
Allocate and free memory in the same module, at the same level of abstraction |
|
Store a new value in pointers immediately after free() |
|
Immediately cast the result of a memory allocation function call into a pointer to the allocated type |
|
Clear sensitive information stored in reusable resources |
|
Beware of zero-length allocations |
|
Avoid large stack allocations |
|
Ensure that sensitive data is not written out to disk |
|
Define and use a pointer validation function |
|
Do not assume infinite heap space |
|
Consider using a goto chain when leaving a function on error when using and releasing resources |
Options
Setting an option for this rule means setting the default for all nested rules.
This rule shares the following common options: confidence, exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
This rule has no individual options.