X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjournal%2Fjournald-kmsg.c;h=2f536320f8d90d41a8eff6740a55da8051ed83a7;hb=4b94f3b8f7693f076e5c85bc2c02cf028192d8de;hp=b8198760d6938364e910cddb74a6d5522fd34001;hpb=d025f1e4dca8fc1436aff76f9e6185fe3e728daa;p=elogind.git diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c index b8198760d..2f536320f 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++;