[Libosinfo] [osinfo-db-tools PATCH 3/3] validate: Don't leak "files"

Fabiano Fidêncio fidencio at redhat.com
Mon May 20 12:39:13 UTC 2019


Error: CLANG_WARNING:
osinfo-db-tools-1.5.0/tools/osinfo-db-validate.c:319:9: warning:
Potential leak of memory pointed to by 'files'
 #        g_printerr("%s\n", error->message);
 #        ^

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
 tools/osinfo-db-validate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c
index 0e28e1c..7fd87d2 100644
--- a/tools/osinfo-db-validate.c
+++ b/tools/osinfo-db-validate.c
@@ -327,6 +327,7 @@ gint main(gint argc, gchar **argv)
         g_object_unref(schema);
     if (dir)
         g_object_unref(dir);
+    g_free(files);
     g_clear_error(&error);
     g_option_context_free(context);
 
-- 
2.21.0




More information about the Libosinfo mailing list