[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [libvirt-designer 2/2] Fix leaks of libosinfo data



---
 examples/virtxml.c                         | 3 +++
 libvirt-designer/libvirt-designer-domain.c | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/examples/virtxml.c b/examples/virtxml.c
index c5a5e24..d4a5fe2 100644
--- a/examples/virtxml.c
+++ b/examples/virtxml.c
@@ -126,6 +126,7 @@ print_oses(const gchar *option_name,
 cleanup:
     if (list)
         g_object_unref(list);
+    g_list_free(oses);
 
     exit(ret);
     return TRUE;
@@ -166,6 +167,7 @@ print_platforms(const gchar *option_name,
 cleanup:
     if (list)
         g_object_unref(list);
+    g_list_free(platforms);
 
     exit(ret);
     return TRUE;
@@ -306,6 +308,7 @@ find_entity_by_short_id(OsinfoList *ent_list,
             break;
         }
     }
+    g_list_free(list);
 
     return ret;
 }
diff --git a/libvirt-designer/libvirt-designer-domain.c b/libvirt-designer/libvirt-designer-domain.c
index c3a5ce3..dcd8d0d 100644
--- a/libvirt-designer/libvirt-designer-domain.c
+++ b/libvirt-designer/libvirt-designer-domain.c
@@ -737,6 +737,8 @@ gvir_designer_domain_get_supported_disk_bus_types(GVirDesignerDomain *design)
     ret = g_list_copy(ret);
 
 cleanup:
+    if (dev_list != NULL)
+        g_object_unref(G_OBJECT(dev_list));
     g_hash_table_destroy(bus_hash);
     return ret;
 }
-- 
1.8.1.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]