1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Use the DbMalloc() and DbRealloc() functions more consistently. (CVS 4323)

FossilOrigin-Name: c790c234c369c6b7610e67dcaaa9eee347df729c
This commit is contained in:
danielk1977
2007-08-29 14:06:22 +00:00
parent f53e9b5ad5
commit 26783a58e2
12 changed files with 59 additions and 52 deletions

View File

@@ -12,7 +12,7 @@
** Memory allocation functions used throughout sqlite.
**
**
** $Id: malloc.c,v 1.12 2007/08/29 12:31:26 danielk1977 Exp $
** $Id: malloc.c,v 1.13 2007/08/29 14:06:23 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <stdarg.h>
@@ -104,6 +104,10 @@ void *sqlite3DbMallocRaw(sqlite3 *db, unsigned n){
return p;
}
/*
** Resize the block of memory pointed to by p to n bytes. If the
** resize fails, set the mallocFailed flag inthe connection object.
*/
void *sqlite3DbRealloc(sqlite3 *db, void *p, int n){
void *pNew = 0;
if( db->mallocFailed==0 ){