chiark / gitweb /
networkctl: fix strappend() error checking
authorDavid Herrmann <dh.herrmann@gmail.com>
Wed, 31 Dec 2014 14:56:11 +0000 (15:56 +0100)
committerDavid Herrmann <dh.herrmann@gmail.com>
Wed, 31 Dec 2014 14:56:11 +0000 (15:56 +0100)
Make sure to test the right variable for NULL.

src/network/networkctl.c

index 21e9b38..15dfb81 100644 (file)
@@ -880,7 +880,7 @@ static char *lldp_system_caps(uint16_t cap) {
         }
 
         t = strappend(s, "]");
-        if (!s)
+        if (!t)
                 return NULL;
 
         free(s);