summaryrefslogtreecommitdiff
path: root/src/journal/coredumpctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal/coredumpctl.c')
-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;
}