Fix: cmd snapshot record output can't be NULL
authorDavid Goulet <dgoulet@efficios.com>
Wed, 1 Oct 2014 18:40:13 +0000 (14:40 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Wed, 1 Oct 2014 18:40:13 +0000 (14:40 -0400)
The session daemon calls cmd_record_snapshot always with a valid
pointer.

Fixes Coverity issue 1047269.

Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/cmd.c

index 1fd799f0d819e375fdc05e672dfec14cccc275e6..dcb79dda2ab9be31cb75f523691640d3055b6293 100644 (file)
@@ -3055,6 +3055,7 @@ int cmd_snapshot_record(struct ltt_session *session,
        uint64_t session_max_size = 0, max_stream_size = 0;
 
        assert(session);
+       assert(output);
 
        DBG("Cmd snapshot record for session %s", session->name);
 
@@ -3074,7 +3075,7 @@ int cmd_snapshot_record(struct ltt_session *session,
        }
 
        /* Use temporary output for the session. */
-       if (output && *output->ctrl_url != '\0') {
+       if (*output->ctrl_url != '\0') {
                ret = snapshot_output_init(output->max_size, output->name,
                                output->ctrl_url, output->data_url, session->consumer,
                                &tmp_output, NULL);
This page took 0.027829 seconds and 5 git commands to generate.