Unlocking early and returning in the if-block just complicate the code to no material benefit. Signed-off-by: Jeremy Sowden <jeremy@xxxxxxxxxx> --- extensions/xt_condition.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/extensions/xt_condition.c b/extensions/xt_condition.c index 0b0508b7723c..cf07966e71b7 100644 --- a/extensions/xt_condition.c +++ b/extensions/xt_condition.c @@ -193,9 +193,7 @@ static void condition_mt_destroy(const struct xt_mtdtor_param *par) list_del(&var->list); if (cnet->proc_net_condition) remove_proc_entry(var->name, cnet->proc_net_condition); - mutex_unlock(&cnet->proc_lock); kfree(var); - return; } mutex_unlock(&cnet->proc_lock); } -- 2.32.0