xbps_sort_pkg_deps: change an assertion into a real check.
This commit is contained in:
parent
097b50b3c2
commit
ec7549fa04
@ -203,7 +203,11 @@ again:
|
|||||||
}
|
}
|
||||||
curpkgd = xbps_find_pkg_in_dict_by_name(transd,
|
curpkgd = xbps_find_pkg_in_dict_by_name(transd,
|
||||||
"unsorted_deps", pkgnamedep);
|
"unsorted_deps", pkgnamedep);
|
||||||
assert(curpkgd != NULL);
|
if (curpkgd == NULL) {
|
||||||
|
free(pkgnamedep);
|
||||||
|
rv = EINVAL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
lpd = pkgdep_alloc(curpkgd, pkgnamedep);
|
lpd = pkgdep_alloc(curpkgd, pkgnamedep);
|
||||||
if (lpd == NULL) {
|
if (lpd == NULL) {
|
||||||
free(pkgnamedep);
|
free(pkgnamedep);
|
||||||
|
Loading…
Reference in New Issue
Block a user