Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

According to the C Standard, tusing using the value of a pointer that refers to space deallocated by a call to the free() or realloc() function is undefined behavior (see undefined behavior 177).

...

CERT C Secure Coding StandardMEM01-C. Store a new value in pointers immediately after free()
CERT C++ Secure Coding StandardMEM30MEM50-CPP. Do not access freed memory
ISO/IEC TR 24772:2013Dangling References to Stack Frames [DCM]
Dangling Reference to Heap [XYK]
ISO/IEC TS 17961

Accessing freed memory [accfree]
Freeing memory multiple times [dblfree]

MISRA C:2012Rule 18.6 (required)
MITRE CWE

CWE-415, Double Free
CWE-416, Use After Free

...