From: Mathieu Desnoyers Date: Tue, 17 May 2016 14:44:25 +0000 (-0400) Subject: Fix: NULL pointer dereference in relay_index_get_by_id_or_create X-Git-Tag: v2.9.0-rc1~194 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=719155c2bed581d85290537fd95bafc787229dbc;p=lttng-tools.git Fix: NULL pointer dereference in relay_index_get_by_id_or_create Found by Coverity: CID 1323134 (#1 of 1): Dereference after null check (FORWARD_NULL)34. var_deref_op: Dereferencing null pointer index. Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-relayd/index.c b/src/bin/lttng-relayd/index.c index 9c307790a..80a4bb94d 100644 --- a/src/bin/lttng-relayd/index.c +++ b/src/bin/lttng-relayd/index.c @@ -162,7 +162,7 @@ struct relay_index *relay_index_get_by_id_or_create(struct relay_stream *stream, end: rcu_read_unlock(); DBG2("Index %sfound or created in HT for stream ID %" PRIu64 " and seqnum %" PRIu64, - (index == NULL) ? "NOT " : "", index->stream->stream_handle, net_seq_num); + (index == NULL) ? "NOT " : "", stream->stream_handle, net_seq_num); return index; }