The patch was applied incorrectly in master, see attachment. Also, there
was a double free in the same module.
--
Pavel Levshin
25.10.2013 12:16, Pavel Levshin:
Here is the patch to a memory leak in omhiredis.
--
Pavel Levshin
From: Pavel Levshin <[email protected]>
Date: Fri, 25 Oct 2013 12:08:09 +0400
Subject: [PATCH] omhiredis: remove memory leak
---
plugins/omhiredis/omhiredis.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/plugins/omhiredis/omhiredis.c
b/plugins/omhiredis/omhiredis.c index 051ac0b..cb4e608 100644
--- a/plugins/omhiredis/omhiredis.c
+++ b/plugins/omhiredis/omhiredis.c
@@ -196,7 +196,7 @@ CODESTARTendTransaction
for ( i = 0; i < pData->count; i++ ) {
redisGetReply ( pData->conn, (void *)&pData->replies[i] );
/* TODO: add error checking here! */
- free ( pData->replies[i] );
+ freeReplyObject ( pData->replies[i] );
}
free ( pData->replies );
pData->count = 0;
--
1.7.1
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a
myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST
if you DON'T LIKE THAT.
diff --git a/plugins/omhiredis/omhiredis.c b/plugins/omhiredis/omhiredis.c
index 7a35bac..757d5eb 100644
--- a/plugins/omhiredis/omhiredis.c
+++ b/plugins/omhiredis/omhiredis.c
@@ -97,7 +97,6 @@ BEGINfreeInstance
CODESTARTfreeInstance
closeHiredis(pData);
free(pData->server);
- free(pData->tplName);
ENDfreeInstance
@@ -196,9 +195,9 @@ CODESTARTendTransaction
for ( i = 0; i < pData->count; i++ ) {
redisGetReply ( pData->conn, (void *)&pData->replies[i] );
/* TODO: add error checking here! */
- free ( pData->replies[i] );
+ freeReplyObject ( pData->replies[i] );
}
- freeReplyObject ( pData->replies );
+ free ( pData->replies );
pData->count = 0;
ENDendTransaction
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.