summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2014-01-14 15:40:16 +0100
committerLukas Nykryn <lnykryn@redhat.com>2014-01-14 15:40:16 +0100
commitcf50a55277ee432e1217ad894afcbd9a664ff96c (patch)
tree79da856a43b675bc041e6016069bb85c91ea16ff /src/journal
parent8c56c8bd319e419acbedf24b65bc008ad0e5b8b0 (diff)
coredumpctl: in case of error free pattern after print
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/coredumpctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c
index 70eaf0e64c..e564ab656c 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;
}