bin/xbps-rindex/index-add.c: resource leak (CID 62718)
This commit is contained in:
parent
4ae3d03594
commit
62cb6f14e6
@ -165,11 +165,13 @@ index_add(struct xbps_handle *xhp, int argc, char **argv, bool force)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (!xbps_dictionary_set_cstring(binpkgd, "filename-sha256", sha256)) {
|
if (!xbps_dictionary_set_cstring(binpkgd, "filename-sha256", sha256)) {
|
||||||
|
free(sha256);
|
||||||
free(pkgver);
|
free(pkgver);
|
||||||
free(pkgname);
|
free(pkgname);
|
||||||
rv = EINVAL;
|
rv = EINVAL;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
free(sha256);
|
||||||
if (stat(argv[i], &st) == -1) {
|
if (stat(argv[i], &st) == -1) {
|
||||||
free(pkgver);
|
free(pkgver);
|
||||||
free(pkgname);
|
free(pkgname);
|
||||||
|
Loading…
Reference in New Issue
Block a user