doc: Set all memory to zero in secure_free

This commit is contained in:
Petri Lehtinen 2013-11-14 08:49:16 +02:00
parent e4d6a9f6f4
commit 67a7bc7376
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}

View File

@ -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);
}