1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 23:21:22 +03:00

coredump: do not leak memory (#8352)

Fixes #8351.
This commit is contained in:
Yu Watanabe 2018-03-05 16:39:52 +09:00 committed by Zbigniew Jędrzejewski-Szmek
parent a8170f9a3f
commit e8fb0238cd

View File

@ -94,10 +94,7 @@ static int add_match(sd_journal *j, const char *match) {
else else
prefix = "COREDUMP_COMM="; prefix = "COREDUMP_COMM=";
pattern = strjoin(prefix, match); pattern = strjoina(prefix, match);
if (!pattern)
return log_oom();
log_debug("Adding match: %s", pattern); log_debug("Adding match: %s", pattern);
r = sd_journal_add_match(j, pattern, 0); r = sd_journal_add_match(j, pattern, 0);
if (r < 0) if (r < 0)