libpkgconf: fix memory leak

Signed-off-by: Colin Gillespie <colin@cgillespie.xyz>
Colin Gillespie 2023-09-03 16:19:14 +10:00 committed by Ariadne Conill
parent 652aff9790
commit 5aeb469b81
1 changed files with 1 additions and 1 deletions

View File

@ -1417,7 +1417,7 @@ pkgconf_pkg_verify_dependency(pkgconf_client_t *client, pkgconf_dependency_t *pk
pkgdep->match = pkgconf_pkg_ref(client, pkg);
}
if (pkg != NULL)
if (pkg != NULL && pkg->why == NULL)
pkg->why = strdup(pkgdep->package);
return pkg;