From b5a146978c14a3b7e690996ac129ce8f7e0f2bad Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 29 Aug 2011 10:07:26 -0400 Subject: [PATCH] Fix error handling Signed-off-by: Mathieu Desnoyers --- libringbuffer/ring_buffer_frontend.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libringbuffer/ring_buffer_frontend.c b/libringbuffer/ring_buffer_frontend.c index f242cc07..bd774dfa 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) -- 2.34.1