elf: zero *array when count is zero.
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Tue, 3 Jan 2012 16:53:15 +0000 (14:53 -0200)
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Tue, 3 Jan 2012 16:53:15 +0000 (14:53 -0200)
libkmod/libkmod-elf.c

index 8052e4e..9ffaa65 100644 (file)
@@ -1049,6 +1049,7 @@ int kmod_elf_get_dependency_symbols(const struct kmod_elf *elf, struct kmod_modv
        if (count == 0) {
                free(visited_versions);
                free(symcrcs);
+               *array = NULL;
                return 0;
        }