Skip to content

Commit

Permalink
V4L/DVB: drivers/media/radio/si470x/radio-si470x-usb.c fix use after …
Browse files Browse the repository at this point in the history
…free

In si470x_usb_driver_disconnect() radio->disconnect_lock is accessed
after it is freed. This fixes the problem.

Coverity CID: 2530

Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Darren Jenkins authored and Mauro Carvalho Chehab committed Feb 26, 2010
1 parent 8ef4c21 commit 96dd6de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/media/radio/si470x/radio-si470x-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -842,9 +842,11 @@ static void si470x_usb_driver_disconnect(struct usb_interface *intf)
kfree(radio->int_in_buffer);
video_unregister_device(radio->videodev);
kfree(radio->buffer);
mutex_unlock(&radio->disconnect_lock);
kfree(radio);
} else {
mutex_unlock(&radio->disconnect_lock);
}
mutex_unlock(&radio->disconnect_lock);
}


Expand Down

0 comments on commit 96dd6de

Please sign in to comment.