From: David Goulet Date: Wed, 1 Oct 2014 18:40:13 +0000 (-0400) Subject: Fix: cmd snapshot record output can't be NULL X-Git-Tag: v2.6.0-rc1~18 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ba45d9f035c9601a47e2903b16746eb0804059f3;p=lttng-tools.git Fix: cmd snapshot record output can't be NULL The session daemon calls cmd_record_snapshot always with a valid pointer. Fixes Coverity issue 1047269. Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 1fd799f0d..dcb79dda2 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -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);