Skip to content

Commit

Permalink
[IRDA]: irlmp_unregister_link() needs to free lsaps.
Browse files Browse the repository at this point in the history
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 <hinko.kocevar@cetrtapot.si>
Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Hinko Kocevar authored and David S. Miller committed Dec 16, 2007
1 parent 0ff8043 commit 2638698
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/irda/irlmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 2638698

Please sign in to comment.