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)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 2 May 2019 04:05:45 +0000 (00:05 -0400)
commit8328cc280dccac7df8df7b0d5e10d6bdc5fd7938
treed133b91f0496d5ef5cb7b96ea939a135a7907786
parent778f1ddd0f0cccf93d30381a73eab2bf8b3ac867
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.024105 seconds and 4 git commands to generate.