From 225b05795f9f9963e8c9431e3a4f1b0503a45ec1 Mon Sep 17 00:00:00 2001 From: dan Date: Fri, 18 Jan 2019 21:17:08 +0000 Subject: [PATCH] Fix a memory leak introduced by [55c5d72a]. FossilOrigin-Name: fbd681dce2905d8b8ad7948ba684b0b62d6c04be0f7a2992ee7d6836a99010de --- ext/fts3/fts3.c | 4 ++++ manifest | 12 ++++++------ manifest.uuid | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ext/fts3/fts3.c b/ext/fts3/fts3.c index 4e6186ee64..e980596506 100644 --- a/ext/fts3/fts3.c +++ b/ext/fts3/fts3.c @@ -2569,6 +2569,10 @@ static int fts3DoclistOrMerge( } } + if( rc!=SQLITE_OK ){ + sqlite3_free(aOut); + p = aOut = 0; + } *paOut = aOut; *pnOut = (int)(p-aOut); assert( *pnOut<=n1+n2+FTS3_VARINT_MAX-1 ); diff --git a/manifest b/manifest index 4a58150d2e..361b0df9a3 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\scrash\sin\sthe\sfts5vocab\smodule\scaused\sby\sincluding\sa\s"term\s<\sNULL"\sterm\nin\sa\sWHERE\sclause. -D 2019-01-18T21:12:32.602 +C Fix\sa\smemory\sleak\sintroduced\sby\s[55c5d72a]. +D 2019-01-18T21:17:08.541 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F Makefile.in 2a9d0331ab57c68173a4c2fe9046fe89c4d916a888e04dd7a2d36958c2bff777 @@ -80,7 +80,7 @@ F ext/fts3/README.content fdc666a70d5257a64fee209f97cf89e0e6e32b51 F ext/fts3/README.syntax a19711dc5458c20734b8e485e75fb1981ec2427a F ext/fts3/README.tokenizers e0a8b81383ea60d0334d274fadf305ea14a8c314 F ext/fts3/README.txt 8c18f41574404623b76917b9da66fcb0ab38328d -F ext/fts3/fts3.c ec300b0af6989840c624976969bdfabdb252df517d743c8ca19cef3cd0cbc1ce +F ext/fts3/fts3.c 90352639eb4465fdfa0a122c70ce17a9ea2dbbeab1576daf9be637aa199b3fd9 F ext/fts3/fts3.h 3a10a0af180d502cecc50df77b1b22df142817fe F ext/fts3/fts3Int.h 6c666f314caaeb8fe8e4c1a2d84f8b34406647429a43e8f475b0b0074ad41861 F ext/fts3/fts3_aux.c 32e3ecada9014ff577022f9b44c9c5654d59405b39dc57ba8977298157e8c89b @@ -1800,7 +1800,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 55c5d72af9510e2f27c33544d804a58d4282b0efb384ead38484129ce91b574f -R 85576c98e4a9bc4cebd1d1250bc88947 +P 9e717c4377c0116a5d36815fbc30f8b8803f14770d30be361feb27cc5b5b537b +R b49a74f5cdb5574f8f9ffaf07b939964 U dan -Z d48b5a3416d6d2456cec986de9a7bacd +Z 36f366ba2e0450a8c9dac1df7e806f68 diff --git a/manifest.uuid b/manifest.uuid index 294b92e3c0..46acdb450c 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -9e717c4377c0116a5d36815fbc30f8b8803f14770d30be361feb27cc5b5b537b \ No newline at end of file +fbd681dce2905d8b8ad7948ba684b0b62d6c04be0f7a2992ee7d6836a99010de \ No newline at end of file