Fix: comparing array against NULL
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 18 Jun 2013 18:51:15 +0000 (14:51 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Wed, 19 Jun 2013 18:47:21 +0000 (14:47 -0400)
1019939 Array compared against 0
In process_client_msg: Array compared against NULL pointer (CWE-398)

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/bin/lttng-sessiond/main.c

index 746f21e456f663b02cd7b8f5a00d913788d3cbd9..55751e85b1d3bf480f24ef9e22cf231910a46f1b 100644 (file)
@@ -2562,12 +2562,7 @@ static int process_client_msg(struct command_ctx *cmd_ctx, int sock,
                session_lock_list();
                cmd_ctx->session = session_find_by_name(cmd_ctx->lsm->session.name);
                if (cmd_ctx->session == NULL) {
-                       if (cmd_ctx->lsm->session.name != NULL) {
-                               ret = LTTNG_ERR_SESS_NOT_FOUND;
-                       } else {
-                               /* If no session name specified */
-                               ret = LTTNG_ERR_SELECT_SESS;
-                       }
+                       ret = LTTNG_ERR_SESS_NOT_FOUND;
                        goto error;
                } else {
                        /* Acquire lock for the session */
This page took 0.031338 seconds and 4 git commands to generate.