]> granicus.if.org Git - icinga2/commitdiff
Add missing freeReplyObject calls
authorGunnar Beutner <gunnar.beutner@icinga.com>
Thu, 16 Mar 2017 14:09:21 +0000 (15:09 +0100)
committerGunnar Beutner <gunnar.beutner@icinga.com>
Thu, 16 Mar 2017 14:09:41 +0000 (15:09 +0100)
refs #4991

lib/redis/rediswriter.cpp

index 8314d724c3582cd459ed458db860760c7cc80ea6..619855fa8f1eaf1298a4773a30103826f7520581 100644 (file)
@@ -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;
                }