Avoid unnecessary (no-op) calls to sqlite3DbFree() from sqlite3VdbeMemRelease().

FossilOrigin-Name: 2d6dd7c2eb5a64f8994162b564a99ef0014b7460
This commit is contained in:
drh 2013-12-09 03:07:21 +00:00
parent 8f518837f9
commit 7250c547a5
3 changed files with 12 additions and 10 deletions

View File

@ -1,5 +1,5 @@
C Use\smemmove()\srather\sthan\sa\shome-made\scopy\sloop\sin\sinsertCell()\stoo.
D 2013-12-09T02:32:19.333
C Avoid\sunnecessary\s(no-op)\scalls\sto\ssqlite3DbFree()\sfrom\ssqlite3VdbeMemRelease().
D 2013-12-09T03:07:21.713
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in e1a9b4258bbde53f5636f4e238c65b7e11459e2b
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -286,7 +286,7 @@ F src/vdbeInt.h 05fbda0e061dbc4aaa2709a8cccf3515c245b263
F src/vdbeapi.c 93a22a9ba2abe292d5c2cf304d7eb2e894dde0ed
F src/vdbeaux.c 09b79d475f5af2b3b5068f639609d88e0ced9d95
F src/vdbeblob.c 8cd05a5630e6d5563ad017bf82edaf812b28acde
F src/vdbemem.c 20e349d2ca928802fc8f2d42a2cc488fd6981d3f
F src/vdbemem.c f12d087d92f57fc302028ac1b45374bf8a454d7e
F src/vdbesort.c 9d83601f9d6243fe70dd0169a2820c5ddfd48147
F src/vdbetrace.c e7ec40e1999ff3c6414424365d5941178966dcbc
F src/vtab.c 21b932841e51ebd7d075e2d0ad1415dce8d2d5fd
@ -1146,7 +1146,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
P 78e1706804e88a0dd5dc40bee838a3a504cfa53b
R 3d219561bfa9f63d670ef18564ca91c7
P a3d796b1673ca68ced247d63c22ddcfb1f9d56ea
R 92833625552491c74b69254824111a37
U drh
Z a11cf025d0d9777faa558f3c1da4ce10
Z 1f5af3845443b6f278035b5de234203a

View File

@ -1 +1 @@
a3d796b1673ca68ced247d63c22ddcfb1f9d56ea
2d6dd7c2eb5a64f8994162b564a99ef0014b7460

View File

@ -295,10 +295,12 @@ void sqlite3VdbeMemReleaseExternal(Mem *p){
*/
void sqlite3VdbeMemRelease(Mem *p){
VdbeMemRelease(p);
sqlite3DbFree(p->db, p->zMalloc);
if( p->zMalloc ){
sqlite3DbFree(p->db, p->zMalloc);
p->zMalloc = 0;
}
p->z = 0;
p->zMalloc = 0;
p->xDel = 0;
assert( p->xDel==0 ); /* Zeroed by VdbeMemRelease() above */
}
/*