From: Lai Jiangshan Date: Thu, 15 Sep 2011 15:17:41 +0000 (-0400) Subject: avoid memory leak in call_rcu_data_free() X-Git-Tag: v0.6.5~17 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=59dc9e9db2c6d9e9039d7857194955c9b4d00c2d;p=userspace-rcu.git avoid memory leak in call_rcu_data_free() Signed-off-by: Lai Jiangshan Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu-call-rcu-impl.h b/urcu-call-rcu-impl.h index 6cb08be..1ab49bc 100644 --- a/urcu-call-rcu-impl.h +++ b/urcu-call-rcu-impl.h @@ -600,9 +600,10 @@ void call_rcu_data_free(struct call_rcu_data *crdp) *cbs_endprev = cbs; uatomic_add(&default_call_rcu_data->qlen, uatomic_read(&crdp->qlen)); - cds_list_del(&crdp->list); - free(crdp); } + + cds_list_del(&crdp->list); + free(crdp); } /*