chiark / gitweb /
journal: fix memleak, call set_free before return
authorMichal Sekletar <msekleta@redhat.com>
Fri, 26 Oct 2012 12:11:37 +0000 (14:11 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 28 Oct 2012 00:14:40 +0000 (02:14 +0200)
src/journal/coredumpctl.c

index 5b494e3..311c18b 100644 (file)
@@ -60,7 +60,7 @@ static Set *new_matches(void) {
         tmp = strdup("MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1");
         if (!tmp) {
                 log_oom();
         tmp = strdup("MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1");
         if (!tmp) {
                 log_oom();
-                set_clear_free(set);
+                set_free(set);
                 return NULL;
         }
 
                 return NULL;
         }
 
@@ -68,7 +68,7 @@ static Set *new_matches(void) {
         if (r < 0) {
                 log_error("failed to add to set: %s", strerror(-r));
                 free(tmp);
         if (r < 0) {
                 log_error("failed to add to set: %s", strerror(-r));
                 free(tmp);
-                set_clear_free(set);
+                set_free(set);
                 return NULL;
         }
 
                 return NULL;
         }