Fix: flt.utils.muxer: Potential memory leak
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 15 May 2019 21:55:31 +0000 (17:55 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 21 May 2019 20:14:04 +0000 (16:14 -0400)
commit11603bce22e463c3b53084975b73dd28578c1a50
tree19594b48ca4ac4243bdc556348d8140f003a002c
parent22d6b81a16c70ef2526591760247dafa14b0824a
Fix: flt.utils.muxer: Potential memory leak

scan-build reports a potential memory leak of the
muxer_upstream_msg_iter pointer allocated in the
`muxer_msg_iter_add_upstream_msg_iter()` function if the `g_queue_new()`
fails.

So, free the muxer_upstream_msg_iter on the error path.

Reported-by: scan-build - Potential leak of memory
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: Ia37a1be9525b357d063d5c5bd5623ddccbd4e29d
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1312
Tested-by: jenkins
Reviewed-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
plugins/utils/muxer/muxer.c
This page took 0.024723 seconds and 4 git commands to generate.