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>
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 */