summaryrefslogtreecommitdiff
path: root/src/journal/coredump.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal/coredump.c')
-rw-r--r--src/journal/coredump.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/journal/coredump.c b/src/journal/coredump.c
index 182c2b1bad..fee0a909dc 100644
--- a/src/journal/coredump.c
+++ b/src/journal/coredump.c
@@ -591,9 +591,9 @@ int main(int argc, char* argv[]) {
}
if (sd_pid_get_owner_uid(pid, &owner_uid) >= 0) {
- asprintf(&core_owner_uid, "COREDUMP_OWNER_UID=" UID_FMT, owner_uid);
-
- if (core_owner_uid)
+ r = asprintf(&core_owner_uid,
+ "COREDUMP_OWNER_UID=" UID_FMT, owner_uid);
+ if (r > 0)
IOVEC_SET_STRING(iovec[j++], core_owner_uid);
}