From: Hinko Kocevar Date: Sun, 16 Dec 2007 22:08:58 +0000 (-0800) Subject: [IRDA]: irlmp_unregister_link() needs to free lsaps. X-Git-Tag: v2.6.24-rc6~67^2~2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2638698df30b7b57a8dad7029a0c89fe6c4f6783;p=linux-2.6-omap-h63xx.git [IRDA]: irlmp_unregister_link() needs to free lsaps. While testing the mcs7780 based IrDA USB dongle I've stumbled upon memory leak in irlmp_unregister_link(). Hashbin for lsaps is created in irlmp_register_link and should probably be freed in irlmp_unregister_link(). Signed-off-by: Hinko Kocevar Signed-off-by: Samuel Ortiz Signed-off-by: David S. Miller --- diff --git a/net/irda/irlmp.c b/net/irda/irlmp.c index cedff8068fb..f24cb755908 100644 --- a/net/irda/irlmp.c +++ b/net/irda/irlmp.c @@ -353,6 +353,7 @@ void irlmp_unregister_link(__u32 saddr) /* Final cleanup */ del_timer(&link->idle_timer); link->magic = 0; + hashbin_delete(link->lsaps, (FREE_FUNC) __irlmp_close_lsap); kfree(link); } }