avoid memory leak in call_rcu_data_free()
authorLai Jiangshan <laijs@cn.fujitsu.com>
Thu, 15 Sep 2011 15:17:41 +0000 (11:17 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 15 Sep 2011 15:17:41 +0000 (11:17 -0400)
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
urcu-call-rcu-impl.h

index 6cb08be5731299c0d3334face6296faf9a98d7e7..1ab49bc69da4eb753b264f90f5393cd22ce0fe98 100644 (file)
@@ -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);
 }
 
 /*
This page took 0.025577 seconds and 4 git commands to generate.