Fix error handling
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 29 Aug 2011 14:07:26 +0000 (10:07 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 29 Aug 2011 14:07:26 +0000 (10:07 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
libringbuffer/ring_buffer_frontend.c

index f242cc07e825d81beb667c4dd401749df98ebaa6..bd774dfa4645633708dc82c68f35a074436e73c2 100644 (file)
@@ -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)
This page took 0.025774 seconds and 4 git commands to generate.