Closed FSMaxB closed 8 years ago
When doing a free, the pointer should be overwritten with NULL so that it is impossible to use a freed pointer.
free
NULL
This looks like this:
#define free_and_null(pointer) free(pointer); pointer = NULL; #define sodium_free_and_null(pointer) sodium_free(pointer); pointer = NULL;
When doing a
free
, the pointer should be overwritten withNULL
so that it is impossible to use a freed pointer.This looks like this: