From e32f7f4909c7879f8afd96955b3c206811faf973 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 11 Sep 2014 08:04:51 +0200 Subject: [PATCH] xbps-pkgdb: unfix previous, pkg metafile must be internalized. --- bin/xbps-pkgdb/check.c | 2 ++ 1 file changed, 2 insertions(+) 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; } }