Fix: Add missing free() in spawn_viewer
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 16 May 2016 23:33:08 +0000 (19:33 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 20 May 2016 20:37:57 +0000 (16:37 -0400)
Fixes coverity #1291948

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng/commands/view.c

index f90c3f6b94315ad78d2f3722959451b3f117b1f0..66e987d194ac4814cf44ae8ecd5d9b153040deb3 100644 (file)
@@ -295,12 +295,12 @@ static int spawn_viewer(const char *trace_path)
                } else {
                        PERROR("exec: %s", viewer_bin);
                }
-               free(argv);
                ret = CMD_FATAL;
                goto error;
        }
 
 error:
+       free(argv);
        return ret;
 }
 
This page took 0.027245 seconds and 4 git commands to generate.