mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-22 17:35:55 +03:00
sysroot: Plug some leaks
The deployments and booted deployment were never unreffed. Also, remote (void) from the call to the unload function - it returns nothing, so there is no need to fool the compiler. Closes: #287 Approved by: cgwalters
This commit is contained in:
parent
d270085ef3
commit
58532e5917
@ -70,10 +70,12 @@ ostree_sysroot_finalize (GObject *object)
|
||||
g_clear_object (&self->path);
|
||||
g_clear_object (&self->sepolicy);
|
||||
g_clear_object (&self->repo);
|
||||
g_clear_pointer (&self->deployments, g_ptr_array_unref);
|
||||
g_clear_object (&self->booted_deployment);
|
||||
|
||||
glnx_release_lock_file (&self->lock);
|
||||
|
||||
(void) ostree_sysroot_unload (self);
|
||||
ostree_sysroot_unload (self);
|
||||
|
||||
G_OBJECT_CLASS (ostree_sysroot_parent_class)->finalize (object);
|
||||
}
|
||||
@ -873,7 +875,7 @@ ostree_sysroot_load_if_changed (OstreeSysroot *self,
|
||||
}
|
||||
|
||||
g_clear_pointer (&self->deployments, g_ptr_array_unref);
|
||||
g_clear_pointer (&self->booted_deployment, g_object_unref);
|
||||
g_clear_object (&self->booted_deployment);
|
||||
self->bootversion = -1;
|
||||
self->subbootversion = -1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user