summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-30 17:47:48 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-31 14:33:30 -0400
commit4b94f3b8f7693f076e5c85bc2c02cf028192d8de (patch)
treec522b22bb2e095770d6989857d6914e10bc01cf5 /src/journal
parent27f6e5c7823f0b763a92d2938d222b900c5d70e6 (diff)
journald: check return value of strappend
Diffstat (limited to 'src/journal')
-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++;