From: Mathieu Desnoyers Date: Mon, 29 Aug 2011 14:07:26 +0000 (-0400) Subject: Fix error handling X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b5a146978c14a3b7e690996ac129ce8f7e0f2bad;p=ust.git Fix error handling Signed-off-by: Mathieu Desnoyers --- diff --git a/libringbuffer/ring_buffer_frontend.c b/libringbuffer/ring_buffer_frontend.c index f242cc0..bd774df 100644 --- a/libringbuffer/ring_buffer_frontend.c +++ b/libringbuffer/ring_buffer_frontend.c @@ -456,6 +456,8 @@ struct shm_handle *channel_create(const struct lib_ring_buffer_config *config, shmsize += sizeof(struct lib_ring_buffer_shmp); shmobj = shm_object_table_append(handle->table, shmsize); + if (!shmobj) + goto error_append; set_shmp(handle->chan, zalloc_shm(shmobj, sizeof(struct channel))); chan = shmp(handle, handle->chan); if (!chan)