udevadm: fix null dererefence on allocation error

CID #1390936.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2018-05-10 01:49:01 +02:00
parent 6a6e9c039f
commit 03d3a9d5be
1 changed files with 2 additions and 1 deletions

View 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;