Blame SOURCES/0051-coredumpctl-in-case-of-error-free-pattern-after-prin.patch
|
|
65878a |
From 70a0ba4546c69646ef7b220fb5e753416443d5b2 Mon Sep 17 00:00:00 2001
|
|
|
65878a |
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
|
65878a |
Date: Tue, 14 Jan 2014 15:40:16 +0100
|
|
|
65878a |
Subject: [PATCH] coredumpctl: in case of error free pattern after print
|
|
|
65878a |
|
|
|
65878a |
---
|
|
|
65878a |
src/journal/coredumpctl.c | 3 ++-
|
|
|
65878a |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
65878a |
|
|
|
65878a |
diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c
|
|
|
65878a |
index 75c96cc..356d03d 100644
|
|
|
65878a |
--- a/src/journal/coredumpctl.c
|
|
|
65878a |
+++ b/src/journal/coredumpctl.c
|
|
|
65878a |
@@ -126,10 +126,11 @@ static int add_match(Set *set, const char *match) {
|
|
|
65878a |
goto fail;
|
|
|
65878a |
|
|
|
65878a |
log_debug("Adding pattern: %s", pattern);
|
|
|
65878a |
- r = set_consume(set, pattern);
|
|
|
65878a |
+ r = set_put(set, pattern);
|
|
|
65878a |
if (r < 0) {
|
|
|
65878a |
log_error("Failed to add pattern '%s': %s",
|
|
|
65878a |
pattern, strerror(-r));
|
|
|
65878a |
+ free(pattern);
|
|
|
65878a |
goto fail;
|
|
|
65878a |
}
|
|
|
65878a |
|