projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd989a0
)
journal: do not dereference already freed patterns
author
Philippe De Swert
<philippedeswert@gmail.com>
Wed, 10 Sep 2014 09:20:39 +0000
(12:20 +0300)
committer
David Herrmann
<dh.herrmann@gmail.com>
Thu, 11 Sep 2014 15:13:59 +0000
(17:13 +0200)
In case set_consume goes wrong, the pattern name has already been
freed. So we do not try to print it in the logs, assuming the pattern
addition print will be printed just before the failure anyway. Found
with coverity. Fixes: CID#1237798
src/journal/coredumpctl.c
patch
|
blob
|
history
diff --git
a/src/journal/coredumpctl.c
b/src/journal/coredumpctl.c
index
f5cf85a
..
34dcae8
100644
(file)
--- a/
src/journal/coredumpctl.c
+++ b/
src/journal/coredumpctl.c
@@
-110,8
+110,7
@@
static int add_match(Set *set, const char *match) {
log_debug("Adding pattern: %s", pattern);
r = set_consume(set, pattern);
if (r < 0) {
- log_error("Failed to add pattern '%s': %s",
- pattern, strerror(-r));
+ log_error("Failed to add pattern: %s", strerror(-r));
goto fail;
}