X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fudev%2Fudevadm-hwdb.c;h=d9dc73bfc118630101df019b61ffd8eb39afbbfb;hp=4136b17be5a233faeef8dc24388270dfdf92acb3;hb=ef89eef77ee098a6828169a6d0d74128e236bcbd;hpb=86d7de36869429f20d75e34bb3ddb2cfd2470e75 diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c index 4136b17be..d9dc73bfc 100644 --- a/src/udev/udevadm-hwdb.c +++ b/src/udev/udevadm-hwdb.c @@ -303,8 +303,10 @@ static int64_t trie_store_nodes(struct trie_f *trie, struct trie_node *node) { int64_t child_off; child_off = trie_store_nodes(trie, node->children[i].child); - if (child_off < 0) + if (child_off < 0) { + free(children); return child_off; + } children[i].c = node->children[i].c; children[i].child_off = htole64(child_off); }