summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-12-26 09:02:01 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-12-26 09:02:27 -0500
commit92ee6447b1deef7c79962a8121fdf8e58acb3a83 (patch)
tree8b720268c7e128e233ee96fe601ba5431f9d4c3b /src/journal
parent12a717f8347f3daf0ae46a2b71c7d011d9c12fea (diff)
journald: always allocate space for object fields
If OBJECT_PID= came as the last field, we would not reallocate the iovec to bigger size, and fail the assertion later on in dispatch_message_real().
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/journald-native.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/journal/journald-native.c b/src/journal/journald-native.c
index e994752558..b0120ef5f8 100644
--- a/src/journal/journald-native.c
+++ b/src/journal/journald-native.c
@@ -135,7 +135,7 @@ void server_process_native_message(
/* A property follows */
/* n existing properties, 1 new, +1 for _TRANSPORT */
- if (!GREEDY_REALLOC(iovec, m, n + 2 + N_IOVEC_META_FIELDS + !!object_pid * N_IOVEC_OBJECT_FIELDS)) {
+ if (!GREEDY_REALLOC(iovec, m, n + 2 + N_IOVEC_META_FIELDS + N_IOVEC_OBJECT_FIELDS)) {
log_oom();
break;
}