From: Mathieu Desnoyers Date: Thu, 4 Jul 2013 21:53:50 +0000 (-0400) Subject: Fix: consumer: incorrect size zmalloc X-Git-Tag: v2.2.2~5 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e1eb1e0e23e27f60cb610708fc460dc0c8045d33;p=lttng-tools.git Fix: consumer: incorrect size zmalloc Also, check return value. Signed-off-by: Mathieu Desnoyers --- diff --git a/src/common/consumer.c b/src/common/consumer.c index 43848bc5e..ddfca408b 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -2352,7 +2352,11 @@ void *consumer_thread_data_poll(void *data) goto end; } - local_stream = zmalloc(sizeof(struct lttng_consumer_stream)); + local_stream = zmalloc(sizeof(struct lttng_consumer_stream *)); + if (local_stream == NULL) { + PERROR("local_stream malloc"); + goto end; + } while (1) { high_prio = 0;