X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=lttng-tp-mempool.c;h=da476c5ec299920d8312781c53ce60fd3f32ea09;hb=refs%2Fheads%2Fns-phase-1;hp=9db6046b7c7813b97cd3a4f854696fa690ec0f69;hpb=9f36eaed6f91d5897924b551b44d1edd8cee00e2;p=deliverable%2Flttng-modules.git diff --git a/lttng-tp-mempool.c b/lttng-tp-mempool.c index 9db6046b..da476c5e 100644 --- a/lttng-tp-mempool.c +++ b/lttng-tp-mempool.c @@ -138,19 +138,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);