Fix: lttng: memory leak in snapshot record command
[lttng-tools.git] / src / bin / lttng / commands / snapshot.c
index 866b55a38549c3e0cc41cc179a9b3b2ae4d089a2..2a223d44509721fedbdbcbe6bc2f3c12da72828a 100644 (file)
@@ -348,6 +348,7 @@ static int record(const char *url)
        }
 
 error:
+       lttng_snapshot_output_destroy(output);
        return ret;
 }
 
@@ -460,6 +461,9 @@ int cmd_snapshot(int argc, const char **argv)
 
        ret = handle_command(poptGetArgs(pc));
        if (ret < 0) {
+               if (ret == -LTTNG_ERR_EPERM) {
+                       ERR("The session needs to be set in no output mode (--no-output)");
+               }
                ERR("%s", lttng_strerror(ret));
                goto end;
        }
This page took 0.0232 seconds and 4 git commands to generate.