fix very old memory leak in ASCII multigets
if using gets/cas or -o modern, and a key after the first key is too long (>
KEY_MAX_LENGTH), the suffixes used for the previous keys are leaked.
hopefully this solves the mystery memory leaks folks have had on and off over
the years...
@@ -3279,6 +3279,9 @@ static inline void process_get_command(conn *c, token_t *tokens, size_t ntokens,
out_string(c, "CLIENT_ERROR bad command line format");
while (i-- > 0) {
item_remove(*(c->ilist + i));
+ if (return_cas || !settings.inline_ascii_response) {
+ do_cache_free(c->thread->suffix_cache, *(c->suffixlist + i));
+ }
}
return;
}
