Fix: consumer_allocate_stream error handling
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 28 Sep 2012 20:41:25 +0000 (16:41 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Fri, 28 Sep 2012 20:52:52 +0000 (16:52 -0400)
commitc80048c6378b9ee7796c4b833a2c07f6050cc6d7
tree1e98fc378b4bd57d4974cdb7bc467efa13995824
parentc30aaa51f34105a7f20b9ceb39866001843db6e6
Fix: consumer_allocate_stream error handling

Fix a memory leak and "be nice" when handling stream alloc errors. Upon
CPU hotplug, it is possible that we receive a stream only after all
other streams are finalized, which means it could happen that we discard
that channel, in the unlikely event that we have cpu hotplug
concurrently with destroy.

Moreover, this fix the return path of channel lookup failure: we were
returning an zeroed stream rather than returning an error, which was
certainly not the intended behavior.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/consumer.c
src/common/consumer.h
src/common/kernel-consumer/kernel-consumer.c
src/common/ust-consumer/ust-consumer.c
This page took 0.025412 seconds and 4 git commands to generate.