pkg_hash: pkg_hash_check_unresolved: fix segfault
[project/opkg-lede.git] / libopkg / pkg_hash.c
index 879c0ec0e693a62ce507c303f6c1fa2249895a23..dbed3febfbbe68925c85eefe99177385e40c4eb1 100644 (file)
@@ -263,7 +263,7 @@ pkg_hash_check_unresolved(pkg_t *maybe)
        if (unresolved) {
                res = 1;
                tmp = unresolved;
-               while (tmp)
+               while (*tmp)
                        free(*(tmp++));
                free(unresolved);
        }