doc: Set all memory to zero in secure_free
This commit is contained in:
parent
e4d6a9f6f4
commit
67a7bc7376
@ -1476,7 +1476,7 @@ JSON structures by zeroing all memory when freed::
|
||||
ptr -= 8;
|
||||
size = *((size_t *)ptr);
|
||||
|
||||
guaranteed_memset(ptr, 0, size);
|
||||
guaranteed_memset(ptr, 0, size + 8);
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ static void secure_free(void *ptr)
|
||||
ptr = (char *)ptr - 8;
|
||||
size = *((size_t *)ptr);
|
||||
|
||||
/*guaranteed_*/memset(ptr, 0, size);
|
||||
/*guaranteed_*/memset(ptr, 0, size + 8);
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user