lib/repo: Fix a memory leak of options in ostree_repo_create()
Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #1341 Approved by: dbnicholson
This commit is contained in:
parent
f7568dbfc8
commit
4a58364cfa
|
|
@ -1918,8 +1918,9 @@ ostree_repo_create (OstreeRepo *self,
|
||||||
g_variant_new_variant (g_variant_new_string (self->collection_id)));
|
g_variant_new_variant (g_variant_new_string (self->collection_id)));
|
||||||
|
|
||||||
glnx_autofd int repo_dir_fd = -1;
|
glnx_autofd int repo_dir_fd = -1;
|
||||||
|
g_autoptr(GVariant) options = g_variant_ref_sink (g_variant_builder_end (builder));
|
||||||
if (!repo_create_at_internal (AT_FDCWD, repopath, mode,
|
if (!repo_create_at_internal (AT_FDCWD, repopath, mode,
|
||||||
g_variant_builder_end (builder),
|
options,
|
||||||
&repo_dir_fd,
|
&repo_dir_fd,
|
||||||
cancellable, error))
|
cancellable, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue