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 19:14:41 +0000 (15:14 -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 dc37a09ddb58f83f01757dc5e89c75a46fa2deb9..3879909d913539e7ed885514119ad2d4e4404225 100644 (file)
@@ -285,12 +285,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.026087 seconds and 4 git commands to generate.