diff options
Diffstat (limited to 'src/journal')
-rw-r--r-- | src/journal/journald.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/journal/journald.c b/src/journal/journald.c index 39263bfe4c..f63a12fae8 100644 --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -1405,10 +1405,14 @@ static int stdout_stream_line(StdoutStream *s, char *p) { switch (s->state) { case STDOUT_STREAM_IDENTIFIER: - s->identifier = strdup(p); - if (!s->identifier) { - log_error("Out of memory"); - return -ENOMEM; + if (isempty(p)) + s->identifier = NULL; + else { + s->identifier = strdup(p); + if (!s->identifier) { + log_error("Out of memory"); + return -ENOMEM; + } } s->state = STDOUT_STREAM_PRIORITY; |