Fix memory leak in RedisWriter::ExecuteQuery

refs #4991
This commit is contained in:
Gunnar Beutner 2017-03-22 12:08:54 +01:00 committed by Michael Friedrich
parent dac9775b93
commit 9de4c8bc58
1 changed files with 3 additions and 0 deletions

View File

@ -268,6 +268,9 @@ boost::shared_ptr<redisReply> RedisWriter::ExecuteQuery(const std::vector<String
redisReply *reply = reinterpret_cast<redisReply *>(redisCommandArgv(m_Context, query.size(), argv, argvlen));
delete [] argv;
delete [] argvlen;
if (reply->type == REDIS_REPLY_ERROR) {
Log(LogInformation, "RedisWriter")
<< "Redis query failed: " << reply->str;