[systemd-devel] [PATCH 1/5] journal: fix memleak, call set_free before return

Michal Sekletar msekleta at redhat.com
Fri Oct 26 05:11:37 PDT 2012


---
 src/journal/coredumpctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c
index 5c442ff..aa946ae 100644
--- a/src/journal/coredumpctl.c
+++ b/src/journal/coredumpctl.c
@@ -57,7 +57,7 @@ static Set *new_matches(void) {
         tmp = strdup("MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1");
         if (!tmp) {
                 log_oom();
-                set_clear_free(set);
+                set_free(set);
                 return NULL;
         }
 
@@ -65,7 +65,7 @@ static Set *new_matches(void) {
         if (r < 0) {
                 log_error("failed to add to set: %s", strerror(-r));
                 free(tmp);
-                set_clear_free(set);
+                set_free(set);
                 return NULL;
         }
 
-- 
1.7.11.7



More information about the systemd-devel mailing list