diff options
author | Jiri Slaby <jslaby@suse.cz> | 2013-04-04 19:32:09 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-04-08 09:54:01 (GMT) |
commit | a9bd87c232b87014b20fdf52416f80c5c1e869fc (patch) | |
tree | 9c5dfe0a29a80007dde51c6a09acdac3fbb0ffbd /drivers/media | |
parent | fde04ab95d43e55959f12b92711b0ca4fed40637 (diff) | |
download | linux-a9bd87c232b87014b20fdf52416f80c5c1e869fc.tar.xz |
[media] MEDIA: ttusbir, fix double free
rc_unregister_device already calls rc_free_device to free the passed
device. But in one of ttusbir's probe fail paths, we call
rc_unregister_device _and_ rc_free_device. This is wrong and results
in a double free.
Instead, set rc to NULL resulting in rc_free_device being a noop.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/rc/ttusbir.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/rc/ttusbir.c b/drivers/media/rc/ttusbir.c index cf0d47f..891762d 100644 --- a/drivers/media/rc/ttusbir.c +++ b/drivers/media/rc/ttusbir.c @@ -347,6 +347,7 @@ static int ttusbir_probe(struct usb_interface *intf, return 0; out3: rc_unregister_device(rc); + rc = NULL; out2: led_classdev_unregister(&tt->led); out: |