Skip to contentSkip to conversation

mac80211: memory leak in mesh_queue_preq()

PATCH New Dan Carpenter 1 participant 1 message Nov 15, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: memory leak in mesh_queue_preq()

We recently introduced a return here, but we need to call kfree first.

net/mac80211/mesh_hwmp.c +1 -0
index a7afb2d..8a81591 100644
@@ -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;
 	}