]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udevadm: fix null dererefence on allocation error
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 9 May 2018 23:49:01 +0000 (01:49 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 9 May 2018 23:49:01 +0000 (01:49 +0200)
CID #1390936.

src/udev/udevadm-hwdb.c

index c946131fb754f1db81cceb2fad2b0e785693a46f..646c8507f70ba88c131d90b6b2ca9972b5e835b6 100644 (file)
@@ -703,7 +703,8 @@ out:
         if (trie) {
                 if (trie->root)
                         trie_node_cleanup(trie->root);
-                strbuf_cleanup(trie->strings);
+                if (trie->strings)
+                        strbuf_cleanup(trie->strings);
                 free(trie);
         }
         return rc;