CertC-MEMΒΆ

Memory Management

Nested Rules

CertC-MEM01

Store a new value in pointers immediately after free()

CertC-MEM02

Immediately cast the result of a memory allocation function call into a pointer to the allocated type

CertC-MEM30

Do not access freed memory

CertC-MEM31

Free dynamically allocated memory when no longer needed

CertC-MEM33

Allocate and copy structures containing a flexible array member dynamically

CertC-MEM34

Only free memory allocated dynamically

CertC-MEM35

Allocate sufficient memory for an object

CertC-MEM36

Do not modify the alignment of objects by calling realloc()

Options