Don't leak subtree when /usr/lib/rpm doesn't exist.

This commit is contained in:
James Antill 2014-07-16 00:47:12 -04:00
parent b65365ac31
commit 3d85ab99dc

View File

@ -579,7 +579,10 @@ rpmrev_new (OstreeRepo *repo, GFile *rpmdbdir, const char *rev,
subtree = g_file_resolve_relative_path (root, "/var/lib/rpm");
if (!g_file_query_exists (subtree, cancellable))
{
g_object_unref (subtree);
subtree = g_file_resolve_relative_path (root, "/usr/share/rpm");
}
file_info = g_file_query_info (subtree, OSTREE_GIO_FAST_QUERYINFO,
G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,