[libvirt] [libvirt-glib] gobject: Correct docs for gvir_storage_pool_get_info()

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Wed Sep 23 12:44:28 UTC 2015

The returned GVirStoragePoolInfo pointer is not a GObject so it must not
be unrefed using g_object_unref(). Since gvir_storage_pool_info_free()
is private function, callers must either use g_slice_free() or

Perhaps we should just make gvir_storage_pool_info_free() public instead?

 libvirt-gobject/libvirt-gobject-storage-pool.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libvirt-gobject/libvirt-gobject-storage-pool.c b/libvirt-gobject/libvirt-gobject-storage-pool.c
index 7f26b1b..f015efa 100644
--- a/libvirt-gobject/libvirt-gobject-storage-pool.c
+++ b/libvirt-gobject/libvirt-gobject-storage-pool.c
@@ -277,8 +277,8 @@ GVirConfigStoragePool *gvir_storage_pool_get_config(GVirStoragePool *pool,
  * @pool: the storage_pool
  * @err: Place-holder for possible errors
- * Returns: (transfer full): the info. The returned object should be
- * unreffed with g_object_unref() when no longer needed.
+ * Returns: (transfer full): the info. The returned pointer should be
+ * freed using either #g_slice_free() or #g_boxed_free() when no longer needed.
 GVirStoragePoolInfo *gvir_storage_pool_get_info(GVirStoragePool *pool,
                                                 GError **err)

More information about the libvir-list mailing list