[PATCH 4/6] libxkutil/xml_parse_test: Coverity cleanup

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

 



A new version of Coverity found:

print_domxml(): RESOURCE_LEAK
  - The 'xml' variable needs to be free()'d

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 libxkutil/xml_parse_test.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libxkutil/xml_parse_test.c b/libxkutil/xml_parse_test.c
index 374bcf6..303880d 100644
--- a/libxkutil/xml_parse_test.c
+++ b/libxkutil/xml_parse_test.c
@@ -192,6 +192,7 @@ static void print_domxml(struct domain *dominfo,
                 printf("Failed to create system XML\n");
         else
                 printf("%s\n", xml);
+        free(xml);
 }
 
 static char *read_from_file(FILE *file)
-- 
1.8.4.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]