Fix: bt_stream_common_finalize(): check `stream->destroy_listeners`
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 16 Apr 2018 22:47:39 +0000 (18:47 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 3 May 2019 22:19:34 +0000 (18:19 -0400)
commit85304e9489f3af423c86636690f16f52b34d7694
tree25992b4af8faaa9a0575d1fb2633bf5b6767a0da
parentc1e7fdc43566a18a3be940ef63fe8bca093fb87d
Fix: bt_stream_common_finalize(): check `stream->destroy_listeners`

Issue
=====
In bt_stream_common_finalize(), `stream->destroy_listeners` is not
checked before calling iterating the array to call the destroy
listeners. This can happen if the stream is partially initialized and
then destroyed when there's an error in bt_stream_common_initialize().

Solution
========
Check `stream->destroy_listeners` before iterating the destroy listener
array.

Known drawbacks
===============
None.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
lib/ctf-ir/stream.c
This page took 0.028125 seconds and 4 git commands to generate.