summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/journal/coredump.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/journal/coredump.c b/src/journal/coredump.c
index a7d3c34fe4..68c353fe83 100644
--- a/src/journal/coredump.c
+++ b/src/journal/coredump.c
@@ -241,7 +241,7 @@ int main(int argc, char* argv[]) {
coredump_data = malloc(coredump_bufsize);
if (!coredump_data) {
r = log_oom();
- goto finish;
+ goto finalize;
}
memcpy(coredump_data, "COREDUMP=", 9);
@@ -261,12 +261,12 @@ int main(int argc, char* argv[]) {
if(coredump_size > COREDUMP_MAX) {
log_error("Coredump too large, ignoring");
- goto finish;
+ goto finalize;
}
if (!GREEDY_REALLOC(coredump_data, coredump_bufsize, coredump_size + 1)) {
r = log_oom();
- goto finish;
+ goto finalize;
}
}
@@ -274,6 +274,7 @@ int main(int argc, char* argv[]) {
iovec[j].iov_len = coredump_size;
j++;
+finalize:
r = sd_journal_sendv(iovec, j);
if (r < 0)
log_error("Failed to send coredump: %s", strerror(-r));