[systemd-commits] src/journal

Lukas Nykryn lnykryn at kemper.freedesktop.org
Tue Jan 14 06:40:54 PST 2014


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

New commits:
commit cf50a55277ee432e1217ad894afcbd9a664ff96c
Author: Lukas Nykryn <lnykryn at redhat.com>
Date:   Tue Jan 14 15:40:16 2014 +0100

    coredumpctl: in case of error free pattern after print

diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c
index 70eaf0e..e564ab6 100644
--- a/src/journal/coredumpctl.c
+++ b/src/journal/coredumpctl.c
@@ -126,10 +126,11 @@ static int add_match(Set *set, const char *match) {
                 goto fail;
 
         log_debug("Adding pattern: %s", pattern);
-        r = set_consume(set, pattern);
+        r = set_put(set, pattern);
         if (r < 0) {
                 log_error("Failed to add pattern '%s': %s",
                           pattern, strerror(-r));
+                free(pattern);
                 goto fail;
         }
 



More information about the systemd-commits mailing list