[systemd-commits] src/journal

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Tue Jan 14 06:49:48 PST 2014


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

New commits:
commit ece6b8fd5bbc1fee16f652e680e3033f2f3efc4a
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Tue Jan 14 09:49:10 2014 -0500

    Revert "coredumpctl: in case of error free pattern after print"
    
    This reverts commit cf50a55277ee432e1217ad894afcbd9a664ff96c.
    
    set_consume frees on error.

diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c
index e564ab6..70eaf0e 100644
--- a/src/journal/coredumpctl.c
+++ b/src/journal/coredumpctl.c
@@ -126,11 +126,10 @@ static int add_match(Set *set, const char *match) {
                 goto fail;
 
         log_debug("Adding pattern: %s", pattern);
-        r = set_put(set, pattern);
+        r = set_consume(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