Don't leak subtree when /usr/lib/rpm doesn't exist.
This commit is contained in:
parent
b65365ac31
commit
3d85ab99dc
@ -579,7 +579,10 @@ rpmrev_new (OstreeRepo *repo, GFile *rpmdbdir, const char *rev,
|
|||||||
|
|
||||||
subtree = g_file_resolve_relative_path (root, "/var/lib/rpm");
|
subtree = g_file_resolve_relative_path (root, "/var/lib/rpm");
|
||||||
if (!g_file_query_exists (subtree, cancellable))
|
if (!g_file_query_exists (subtree, cancellable))
|
||||||
|
{
|
||||||
|
g_object_unref (subtree);
|
||||||
subtree = g_file_resolve_relative_path (root, "/usr/share/rpm");
|
subtree = g_file_resolve_relative_path (root, "/usr/share/rpm");
|
||||||
|
}
|
||||||
|
|
||||||
file_info = g_file_query_info (subtree, OSTREE_GIO_FAST_QUERYINFO,
|
file_info = g_file_query_info (subtree, OSTREE_GIO_FAST_QUERYINFO,
|
||||||
G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
|
G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
|
||||||
|
Loading…
Reference in New Issue
Block a user