[PATCH] pkg_hash: pkg_hash_check_unresolved: fix segfault

Daniel Golle daniel at makrotopia.org
Thu Dec 24 06:13:56 EST 2020


Thanks a lot. Applied.

On Thu, Dec 24, 2020 at 04:10:17PM +0800, Yousong Zhou wrote:
> Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
> ---
>  libopkg/pkg_hash.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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);
>  	}



More information about the openwrt-devel mailing list