1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-09 14:21:03 +03:00

Make genericAllocationSize work on NULL pointers. (CVS 2842)

FossilOrigin-Name: 326fc9cc11c86f2d96763537d60757200ce21a84
This commit is contained in:
drh
2005-12-22 13:47:49 +00:00
parent 0b2f3160d6
commit ab8aa68325
3 changed files with 8 additions and 9 deletions

View File

@@ -156,6 +156,5 @@ static void genericFree(void *p){
free((void *)((char *)p - 8));
}
static int genericAllocationSize(void *p){
return *(int *)((char *)p - 8);
return p ? *(int *)((char *)p - 8) : 0;
}