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>
Thu, 19 May 2016 05:38:34 +0000 (01:38 -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 09acc30f42d20803a993c4a777a8496e976b9b74..db13ee22718d9fcc0c4eb9636bcd9593ef012032 100644 (file)
@@ -253,12 +253,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.027484 seconds and 4 git commands to generate.