From: Yousong Zhou Date: Thu, 24 Dec 2020 08:10:17 +0000 (+0800) Subject: pkg_hash: pkg_hash_check_unresolved: fix segfault X-Git-Url: http://git.openwrt.org/?p=project%2Fopkg-lede.git;a=commitdiff_plain;h=9bbc7eae91edc3dbb020e2a50d51d9a3fbbf31ca pkg_hash: pkg_hash_check_unresolved: fix segfault Signed-off-by: Yousong Zhou --- diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c index 879c0ec..dbed3fe 100644 --- a/libopkg/pkg_hash.c +++ b/libopkg/pkg_hash.c @@ -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); }