[PATCH] media: usb: tm6000:clear the freed pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



After free the ir->int_urb, the pointer need to
be set to NULL.

Signed-off-by: Nil Yi <teroincn@xxxxxxx>
---
 drivers/media/usb/tm6000/tm6000-input.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/usb/tm6000/tm6000-input.c b/drivers/media/usb/tm6000/tm6000-input.c
index 84602edf3..49acb97ca 100644
--- a/drivers/media/usb/tm6000/tm6000-input.c
+++ b/drivers/media/usb/tm6000/tm6000-input.c
@@ -346,6 +346,7 @@ static int __tm6000_ir_int_start(struct rc_dev *rc)
 	ir->int_urb->transfer_buffer = kzalloc(size, GFP_ATOMIC);
 	if (!ir->int_urb->transfer_buffer) {
 		usb_free_urb(ir->int_urb);
+		ir->int_urb = NULL;
 		return err;
 	}
 	dprintk(1, "int interval: %d\n", dev->int_in.endp->desc.bInterval);
-- 
2.17.1





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux