X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=libringbuffer%2Fshm.c;h=3bf648d253bd4f00ad8791b34cecb3d75e0c19d2;hb=f08bb871203e921da1b0cdce6f9ff88d32a2fb4e;hp=90160ce1976c7c7c5a2853eca93229c9b3871460;hpb=ff0f57289ff0e6be25424081fabbbfc0e3b1b565;p=lttng-ust.git diff --git a/libringbuffer/shm.c b/libringbuffer/shm.c index 90160ce1..3bf648d2 100644 --- a/libringbuffer/shm.c +++ b/libringbuffer/shm.c @@ -77,6 +77,8 @@ struct shm_object_table *shm_object_table_create(size_t max_nb_obj) table = zmalloc(sizeof(struct shm_object_table) + max_nb_obj * sizeof(table->objects[0])); + if (!table) + return NULL; table->size = max_nb_obj; return table; } @@ -145,7 +147,7 @@ struct shm_object *_shm_object_table_alloc_shm(struct shm_object_table *table, * Using mktemp filename with O_CREAT | O_EXCL open * flags. */ - mktemp(tmp_name); + (void) mktemp(tmp_name); if (tmp_name[0] == '\0') { PERROR("mktemp"); goto error_shm_open;