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.6.3~31 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ef4a79b97e84065a8384ab5d628fbf8365cf9bba;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 0fd7bf6e0..55909d917 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; }