X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-tp-mempool.c;h=21e8376cff007867718550aa2729d0b38033d3fc;hb=416cee8707053a9015dfec8332e12f8c263098e3;hp=d984bd4511b209fbb528c8b19102b4538a1df4b8;hpb=8af8245f6f86370d01cc4acaabafb90de45e143f;p=lttng-modules.git diff --git a/lttng-tp-mempool.c b/lttng-tp-mempool.c index d984bd45..21e8376c 100644 --- a/lttng-tp-mempool.c +++ b/lttng-tp-mempool.c @@ -151,19 +151,12 @@ void lttng_tp_mempool_free(void *ptr) struct lttng_tp_buf_entry *entry; struct per_cpu_buf *cpu_buf; - if (!ptr) { + if (!ptr) goto end; - } - entry = container_of(ptr, struct lttng_tp_buf_entry, buf); - if (!entry) { - goto end; - } - cpu_buf = per_cpu_ptr(pool, entry->cpu); - if (!cpu_buf) { + if (!cpu_buf) goto end; - } /* Add it to the free list. */ list_add_tail(&entry->list, &cpu_buf->free_list);