diff --git a/src/coredump/coredumpctl.c b/src/coredump/coredumpctl.c index 2f8b9b7cbf..62bcbb6be3 100644 --- a/src/coredump/coredumpctl.c +++ b/src/coredump/coredumpctl.c @@ -67,8 +67,7 @@ static bool arg_quiet = false; static int add_match(sd_journal *j, const char *match) { _cleanup_free_ char *p = NULL; - char *pattern = NULL; - const char* prefix; + const char* prefix, *pattern; pid_t pid; int r; @@ -91,6 +90,7 @@ static int add_match(sd_journal *j, const char *match) { r = sd_journal_add_match(j, pattern, 0); if (r < 0) return log_error_errno(r, "Failed to add match \"%s\": %m", match); + return 0; }