pkg_hash: pkg_hash_check_unresolved: fix segfault
authorYousong Zhou <yszhou4tech@gmail.com>
Thu, 24 Dec 2020 08:10:17 +0000 (16:10 +0800)
committerDaniel Golle <daniel@makrotopia.org>
Thu, 24 Dec 2020 11:07:24 +0000 (11:07 +0000)
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
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);
        }