From dd7862f08a178cbf3ba4d076fc380e96141038ff Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 16 Mar 2017 15:09:21 +0100 Subject: [PATCH] Add missing freeReplyObject calls refs #4991 --- lib/redis/rediswriter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/redis/rediswriter.cpp b/lib/redis/rediswriter.cpp index 8314d724c..619855fa8 100644 --- a/lib/redis/rediswriter.cpp +++ b/lib/redis/rediswriter.cpp @@ -146,6 +146,8 @@ void RedisWriter::UpdateSubscriptions(void) Log(LogInformation, "RedisWriter") << "SCAN " << cursor << " MATCH icinga:subscription:* COUNT 1000: " << reply->str; + freeReplyObject(reply); + return; } @@ -174,6 +176,8 @@ void RedisWriter::UpdateSubscriptions(void) Log(LogInformation, "RedisWriter") << "GET " << keyReply->str << ": " << vreply->str; + freeReplyObject(vreply); + continue; } @@ -282,6 +286,8 @@ void RedisWriter::HandleEvent(const Dictionary::Ptr& event) Log(LogInformation, "RedisWriter") << "LPUSH icinga:event:" << kv.first << " " << body << ": " << reply->str; + freeReplyObject(reply); + continue; }