[Spice-commits] server/tests

Frediano Ziglio fziglio at kemper.freedesktop.org
Fri Jan 15 00:58:57 PST 2016


 server/tests/replay.c |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 58c5713aa92a80cb539c05def5454cfb6780ab15
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Tue Dec 22 17:12:01 2015 +0000

    replay: remove command line memory leaks
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Jonathon Jongsma <jjongsma at redhat.com>

diff --git a/server/tests/replay.c b/server/tests/replay.c
index fce6400..11c03a7 100644
--- a/server/tests/replay.c
+++ b/server/tests/replay.c
@@ -306,12 +306,16 @@ int main(int argc, char **argv)
         g_printerr("%s\n", g_option_context_get_help(context, TRUE, NULL));
         exit(1);
     }
+    g_option_context_free(context);
+    context = NULL;
 
     if (strncmp(file[0], "-", 1) == 0) {
         fd = stdin;
     } else {
         fd = fopen(file[0], "r");
     }
+    g_strfreev(file);
+    file = NULL;
     if (fd == NULL) {
         g_printerr("error opening %s\n", argv[1]);
         return 1;
@@ -345,6 +349,8 @@ int main(int argc, char **argv)
     if (client) {
         start_client(client, &error);
         wait = TRUE;
+        g_free(client);
+        client = NULL;
     }
 
     if (!wait) {


More information about the Spice-commits mailing list