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

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



A new version of Coverity found:

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

Signed-off-by: John Ferlan <jferlan redhat com>
---
 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


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