diff --git a/bin/xbps-pkgdb/check.c b/bin/xbps-pkgdb/check.c index 67dcbfa0..b8daf8e6 100644 --- a/bin/xbps-pkgdb/check.c +++ b/bin/xbps-pkgdb/check.c @@ -94,6 +94,7 @@ check_pkg_integrity(struct xbps_handle *xhp, if (xbps_dictionary_get_cstring_nocopy(opkgd, "metafile-sha256", &sha256)) { buf = xbps_xasprintf("%s/.%s-files.plist", xhp->metadir, pkgname); + filesd = xbps_dictionary_internalize_from_file(buf); rv = xbps_file_hash_check(buf, sha256); free(buf); if (rv == ENOENT) { @@ -104,6 +105,7 @@ check_pkg_integrity(struct xbps_handle *xhp, xbps_object_release(filesd); fprintf(stderr, "%s: metadata file has been " "modified!\n", pkgname); + xbps_object_release(filesd); return 1; } }