Make sqlite3Malloc always return NULL when the number of bytes to allocate
is 0. (CVS 2532) FossilOrigin-Name: 657d74ebc1d91c99e8ac6cd68fdac3864ebd8d71
This commit is contained in:
parent
54f080e82c
commit
ba336867c4
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C Update\sSQL\ssyntax\sdocumentation\sto\sdescribe\sthe\snew\sCAST\sexpressions.\s(CVS\s2531)
|
||||
D 2005-06-26T20:00:46
|
||||
C Make\ssqlite3Malloc\salways\sreturn\sNULL\swhen\sthe\snumber\sof\sbytes\sto\sallocate\nis\s0.\s(CVS\s2532)
|
||||
D 2005-06-29T15:33:00
|
||||
F Makefile.in 64a6635ef44a98325e0cffe8d67669920a3dad47
|
||||
F Makefile.linux-gcc 06be33b2a9ad4f005a5f42b22c4a19dab3cbb5c7
|
||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||
@ -75,7 +75,7 @@ F src/tokenize.c 57ec9926612fb9e325b57a141303573bc20c79bf
|
||||
F src/trigger.c f51dec15921629591cb98bf2e350018e268b109a
|
||||
F src/update.c e96c7b342cd8903c672162f4cf84d2c737943347
|
||||
F src/utf.c bda5eb85039ef16f2d17004c1e18c96e1ab0a80c
|
||||
F src/util.c 54d5b4d56f0d14d4ff60881b145d1d3d664bb623
|
||||
F src/util.c 1e7fe04761b07aaeba006b79e88ce7674e316560
|
||||
F src/vacuum.c 829d9e1a6d7c094b80e0899686670932eafd768c
|
||||
F src/vdbe.c 56e892e351eb3ed634c3c239e4ad5c03aecfc2bf
|
||||
F src/vdbe.h 75e466d84d362b0c4498978a9d6b1e6bd32ecf3b
|
||||
@ -283,7 +283,7 @@ F www/tclsqlite.tcl 425be741b8ae664f55cb1ef2371aab0a75109cf9
|
||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
|
||||
F www/whentouse.tcl 528299b8316726dbcc5548e9aa0648c8b1bd055b
|
||||
P 514aaab3f99637ebb8b6e352f4e29738102579b4
|
||||
R 1ab86d1a9e2b07f93e497763112fdc00
|
||||
P d5392866bfd6e06c6d072f649356050b82273a23
|
||||
R e7d4efbbe31d42bc6c03cfcac1241e07
|
||||
U drh
|
||||
Z 409e6bc2a756bbfb87175e52685f9d7e
|
||||
Z 56338a496c34281f80fa8ed727cf9c75
|
||||
|
@ -1 +1 @@
|
||||
d5392866bfd6e06c6d072f649356050b82273a23
|
||||
657d74ebc1d91c99e8ac6cd68fdac3864ebd8d71
|
@ -14,7 +14,7 @@
|
||||
** This file contains functions for allocating memory, comparing
|
||||
** strings, and stuff like that.
|
||||
**
|
||||
** $Id: util.c,v 1.138 2005/06/25 18:42:15 drh Exp $
|
||||
** $Id: util.c,v 1.139 2005/06/29 15:33:00 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <stdarg.h>
|
||||
@ -268,6 +268,7 @@ void sqlite3FreeX(void *p){
|
||||
*/
|
||||
void *sqlite3Malloc(int n){
|
||||
void *p;
|
||||
if( n==0 ) return 0;
|
||||
if( (p = malloc(n))==0 ){
|
||||
if( n>0 ) sqlite3_malloc_failed++;
|
||||
}else{
|
||||
|
Loading…
x
Reference in New Issue
Block a user