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 authored and Atomic Bot committed 2017-12-12 14:03:18 +00:00
1 parent d102cd7db0
commit 6d8aaf629c
1 file changed
+3 -2
+3 -2
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 */