* [PATCH] Input: acecad - fix a memory leak in usb_acecad_probe error path
@ 2010-11-11 3:21 Axel Lin
2010-11-11 7:08 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2010-11-11 3:21 UTC (permalink / raw)
To: linux-kernel
Cc: Dmitry Torokhov, Stephane VOLTZ, Edouard TISSERANT, linux-input
Add a missing usb_free_urb() in usb_acecad_probe() error path.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/input/tablet/acecad.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/input/tablet/acecad.c b/drivers/input/tablet/acecad.c
index aea9a93..d94f7e9 100644
--- a/drivers/input/tablet/acecad.c
+++ b/drivers/input/tablet/acecad.c
@@ -229,12 +229,13 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_
err = input_register_device(acecad->input);
if (err)
- goto fail2;
+ goto fail3;
usb_set_intfdata(intf, acecad);
return 0;
+ fail3: usb_free_urb(acecad->irq);
fail2: usb_free_coherent(dev, 8, acecad->data, acecad->data_dma);
fail1: input_free_device(input_dev);
kfree(acecad);
--
1.7.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-11 7:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-11 3:21 [PATCH] Input: acecad - fix a memory leak in usb_acecad_probe error path Axel Lin
2010-11-11 7:08 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).