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

[virt-tools-list] [libosinfo 3/4] loader: Don't leak 'arch'



---
 osinfo/osinfo_loader.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c
index 606e413..bb7949e 100644
--- a/osinfo/osinfo_loader.c
+++ b/osinfo/osinfo_loader.c
@@ -729,6 +729,7 @@ static OsinfoMedia *osinfo_loader_media (OsinfoLoader *loader,
     };
 
     OsinfoMedia *media = osinfo_media_new(id, arch);
+    xmlFree(arch);
 
     osinfo_loader_entity(loader, OSINFO_ENTITY(media), keys, ctxt, root, err);
     if (live) {
@@ -798,6 +799,7 @@ static OsinfoTree *osinfo_loader_tree (OsinfoLoader *loader,
     };
 
     OsinfoTree *tree = osinfo_tree_new(id, arch);
+    xmlFree(arch);
 
     osinfo_loader_entity(loader, OSINFO_ENTITY(tree), keys, ctxt, root, err);
 
@@ -877,6 +879,7 @@ static OsinfoResources *osinfo_loader_resources(OsinfoLoader *loader,
 
 EXIT:
     g_free(nodes);
+    xmlFree(arch);
 
     return resources;
 }
-- 
1.8.0.1


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