Fix a memory leak in the sqlite3_realloc() implementation of the

non-debugging memory allocator. (CVS 4475)

FossilOrigin-Name: 7e9b886dabf10557bc1aa80caad411809ce5a39f
This commit is contained in:
drh
2007-10-06 01:40:35 +00:00
parent d560305d84
commit e31de778e1
3 changed files with 10 additions and 8 deletions
+3 -1
View File
@@ -12,7 +12,7 @@
** This file contains the C functions that implement a memory
** allocation subsystem for use by SQLite.
**
** $Id: mem1.c,v 1.10 2007/09/02 17:50:35 drh Exp $
** $Id: mem1.c,v 1.11 2007/10/06 01:40:35 drh Exp $
*/
/*
@@ -212,6 +212,8 @@ void *sqlite3_realloc(void *pPrior, int nBytes){
p = realloc(p, nBytes+8);
if( p==0 ){
sqlite3MemsysAlarm(nBytes);
p = pPrior;
p--;
p = realloc(p, nBytes+8);
}
if( p ){