Fix a memory leak in the test code on this branch.

FossilOrigin-Name: 7a1add56341f43dc41adc7b370e58860f4dd50a3
This commit is contained in:
dan 2016-03-01 18:35:55 +00:00
parent a3a44dd379
commit 23c3c38dd6
3 changed files with 8 additions and 7 deletions

View File

@ -1,5 +1,5 @@
C Allow\stest_bestindex.c\sto\sset\sthe\somit\sflag\sfor\sa\sconstraint.
D 2016-03-01T18:24:36.515
C Fix\sa\smemory\sleak\sin\sthe\stest\scode\son\sthis\sbranch.
D 2016-03-01T18:35:55.112
F Makefile.in 4e90dc1521879022aa9479268a4cd141d1771142
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc 4f319afb7c049d40aff7af6e8c4e7cc2ba18e079
@ -371,7 +371,7 @@ F src/test9.c bea1e8cf52aa93695487badedd6e1886c321ea60
F src/test_async.c 21e11293a2f72080eda70e1124e9102044531cd8
F src/test_autoext.c dea8a01a7153b9adc97bd26161e4226329546e12
F src/test_backup.c 2e6e6a081870150f20c526a2e9d0d29cda47d803
F src/test_bestindex.c 6448b9b7ef9729f04093462be539255938d256db
F src/test_bestindex.c 31ac82f4b21395572e26c6693bf47fdd032d6e61
F src/test_blob.c b2551a9b5573232db5f66f292307c37067937239
F src/test_btree.c 2e9978eca99a9a4bfa8cae949efb00886860a64f
F src/test_config.c 0dee90328e3dedf8ba002ee94b6a7e7ea7726fe4
@ -1453,7 +1453,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P de034c0db66298454ae8418949d58eb6e223c0de
R 25f59441195481b2d87b75ea969fe23e
P 759b9d5b22aa60cc1d6b606f81eb7366c28cbcbe
R e9150850334c910fa82ad79b36b013cf
U dan
Z 102ea7e54c5366f48aedd548677f81f2
Z bc3fb098cb9eaf89cb42b29f1b53a09a

View File

@ -1 +1 @@
759b9d5b22aa60cc1d6b606f81eb7366c28cbcbe
7a1add56341f43dc41adc7b370e58860f4dd50a3

View File

@ -329,6 +329,7 @@ static int tclBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
if( sqlite3_stricmp("idxstr", zCmd)==0 ){
sqlite3_free(pIdxInfo->idxStr);
pIdxInfo->idxStr = sqlite3_mprintf("%s", Tcl_GetString(p));
pIdxInfo->needToFreeIdxStr = 1;
}else
if( sqlite3_stricmp("rows", zCmd)==0 ){
rc = Tcl_GetWideIntFromObj(interp, p, &pIdxInfo->estimatedRows);