diff options
author | Tommi Rantala <tt.rantala@gmail.com> | 2012-11-25 23:16:44 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-28 11:25:29 -0500 |
commit | c3b2c2581988d304127c2aa218430b5fca88ce56 (patch) | |
tree | f24f1b072c8113dcafde12f0ca4bb323f13de6e1 /net | |
parent | ba695af067f9cadfec84457ac06b44e3fa849b15 (diff) |
irda: irttp: fix memory leak in irttp_open_tsap() error path
Cleanup the memory we allocated earlier in irttp_open_tsap() when we hit
this error path. The leak goes back to at least 1da177e4
("Linux-2.6.12-rc2").
Discovered with Trinity (the syscall fuzzer).
Signed-off-by: Tommi Rantala <tt.rantala@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/irda/irttp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/irda/irttp.c b/net/irda/irttp.c index 1002e3396f72..ae43c62f9045 100644 --- a/net/irda/irttp.c +++ b/net/irda/irttp.c | |||
@@ -441,6 +441,7 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, notify_t *notify) | |||
441 | lsap = irlmp_open_lsap(stsap_sel, &ttp_notify, 0); | 441 | lsap = irlmp_open_lsap(stsap_sel, &ttp_notify, 0); |
442 | if (lsap == NULL) { | 442 | if (lsap == NULL) { |
443 | IRDA_DEBUG(0, "%s: unable to allocate LSAP!!\n", __func__); | 443 | IRDA_DEBUG(0, "%s: unable to allocate LSAP!!\n", __func__); |
444 | __irttp_close_tsap(self); | ||
444 | return NULL; | 445 | return NULL; |
445 | } | 446 | } |
446 | 447 | ||