relayd: silence null dereference warning during viewer stream creation
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 16 Oct 2020 12:25:10 +0000 (08:25 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 16 Oct 2020 12:25:10 +0000 (08:25 -0400)
commit0eafad74c0d00bf2723ed88320e1c2d8393dab5a
treec48dc9d92877f4f2973a3127fe6ef5b8f9f3a0c1
parent80516611b6f19201b1e173fb448935aca7a9e668
relayd: silence null dereference warning during viewer stream creation

Coverity warns that the vstream's trace chunk may be used NULL.
However, this won't happen if the corresponding relay stream has
an active trace chunk.

Coverity report:
  1433620 Dereference after null check

  Either the check against null is unnecessary, or there may be a
  null pointer dereference.

  In viewer_stream_create: Pointer is checked against null but then
  dereferenced anyway (CWE-476)

Reported-by: Coverity Scan
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ie032ed415a99cfff149e3325d05f37ededb52d33
src/bin/lttng-relayd/viewer-stream.c
This page took 0.032143 seconds and 4 git commands to generate.