Commit 48e0402c authored by liuminghang's avatar liuminghang

fix ParseRedisMessage: 'use after free'

parent 21b1ece8
......@@ -189,7 +189,9 @@ ParseResult ParseRedisMessage(butil::IOBuf* source, Socket* socket,
wopt.ignore_eovercrowded = true;
LOG_IF(WARNING, socket->Write(&sendbuf, &wopt) != 0)
<< "Fail to send redis reply";
ctx->arena.clear();
if (err != PARSE_ERROR_NOT_ENOUGH_DATA) {
ctx->arena.clear();
}
return MakeParseError(err);
} else {
// NOTE(gejun): PopPipelinedInfo() is actually more contended than what
......
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