summaryrefslogtreecommitdiff
path: root/src/journal/coredumpctl.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-01-14 09:49:10 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-01-14 09:49:30 -0500
commitece6b8fd5bbc1fee16f652e680e3033f2f3efc4a (patch)
treed90fd8b12efd304911874c1fe12b4246e9426b28 /src/journal/coredumpctl.c
parentcf50a55277ee432e1217ad894afcbd9a664ff96c (diff)
Revert "coredumpctl: in case of error free pattern after print"
This reverts commit cf50a55277ee432e1217ad894afcbd9a664ff96c. set_consume frees on error.
Diffstat (limited to 'src/journal/coredumpctl.c')
-rw-r--r--src/journal/coredumpctl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c
index e564ab656c..70eaf0e64c 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;
}