summaryrefslogtreecommitdiff
path: root/src/journal/journald-kmsg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal/journald-kmsg.c')
-rw-r--r--src/journal/journald-kmsg.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c
index b8198760d6..2f536320f8 100644
--- a/src/journal/journald-kmsg.c
+++ b/src/journal/journald-kmsg.c
@@ -250,10 +250,12 @@ static void dev_kmsg_record(Server *s, char *p, size_t l) {
break;
g = udev_list_entry_get_name(ll);
- b = strappend("_UDEV_DEVLINK=", g);
if (g) {
- IOVEC_SET_STRING(iovec[n++], b);
- z++;
+ b = strappend("_UDEV_DEVLINK=", g);
+ if (b) {
+ IOVEC_SET_STRING(iovec[n++], b);
+ z++;
+ }
}
j++;