Commit 92f7f81b authored by Shaohua Wang's avatar Shaohua Wang Committed by Marko Mäkelä

BUG#24331265 MEMORY LEAK IN SOME INNODB FTS TESTS

We don't free some memory used by fts optimize thread in release build.

Patch approved by Allen.Lai over IM.
parent f5759bd8
......@@ -578,9 +578,6 @@ fts_zip_read_word(
fts_zip_t* zip, /*!< in: Zip state + data */
fts_string_t* word) /*!< out: uncompressed word */
{
#ifdef UNIV_DEBUG
ulint i;
#endif
short len = 0;
void* null = NULL;
byte* ptr = word->f_str;
......@@ -656,10 +653,9 @@ fts_zip_read_word(
}
}
#ifdef UNIV_DEBUG
/* All blocks must be freed at end of inflate. */
if (zip->status != Z_OK) {
for (i = 0; i < ib_vector_size(zip->blocks); ++i) {
for (ulint i = 0; i < ib_vector_size(zip->blocks); ++i) {
if (ib_vector_getp(zip->blocks, i)) {
ut_free(ib_vector_getp(zip->blocks, i));
ib_vector_set(zip->blocks, i, &null);
......@@ -670,7 +666,6 @@ fts_zip_read_word(
if (ptr != NULL) {
ut_ad(word->f_len == strlen((char*) ptr));
}
#endif /* UNIV_DEBUG */
return(zip->status == Z_OK || zip->status == Z_STREAM_END ? ptr : NULL);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment