From: Dan Carpenter Date: Tue, 15 Nov 2011 06:33:31 +0000 (+0300) Subject: mac80211: memory leak in mesh_queue_preq() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=88d5346512294fbd02fd982173c64cb9b2f0235c;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git mac80211: memory leak in mesh_queue_preq() We recently introduced a return here, but we need to call kfree first. Signed-off-by: Dan Carpenter Signed-off-by: John W. Linville --- diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index a7afb2d32de..8a81591f001 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c @@ -871,6 +871,7 @@ static void mesh_queue_preq(struct mesh_path *mpath, u8 flags) if (mpath->flags & MESH_PATH_REQ_QUEUED) { spin_unlock_bh(&mpath->state_lock); spin_unlock_bh(&ifmsh->mesh_preq_queue_lock); + kfree(preq_node); return; }