The reclaim is also missing on the error path.
Reported by Coverity:
CID
1475807: Resource leak (RESOURCE_LEAK)
Variable channel going out of scope leaks the storage it points to.
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I9ae59900f6bc33282b8b8a65b834a718428a7f50
ret = lttng_channel_serialize(
channel, &payload->buffer);
+ lttng_channel_destroy(channel);
if (ret) {
ERR("Failed to serialize lttng_channel: channel name = '%s'",
channel->name);