lib/commit: Fix memleak in bare-user devino hit path

I noticed this while chasing an entirely different issue:
https://github.com/projectatomic/rpm-ostree/pull/1139

Closes: #1370
Approved by: jlebon
This commit is contained in:
Colin Walters 2017-12-08 14:39:01 -05:00 committed by Atomic Bot
parent d102cd7db0
commit 6d8aaf629c
1 changed files with 3 additions and 2 deletions

View File

@ -3004,12 +3004,13 @@ write_content_to_mtree_internal (OstreeRepo *self,
* there.
*/
g_autoptr(GVariant) source_xattrs = NULL;
g_autoptr(GFileInfo) source_child_info = NULL;
if (loose_checksum && self->mode == OSTREE_REPO_MODE_BARE_USER)
{
child_info = NULL;
if (!ostree_repo_load_file (self, loose_checksum, NULL, &child_info, &source_xattrs,
if (!ostree_repo_load_file (self, loose_checksum, NULL, &source_child_info, &source_xattrs,
cancellable, error))
return FALSE;
child_info = source_child_info;
}
/* Call the filter */