Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96dd6de3 authored by Darren Jenkins's avatar Darren Jenkins Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB: drivers/media/radio/si470x/radio-si470x-usb.c fix use after 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: default avatarDarren Jenkins <darrenrjenkins@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 8ef4c211
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -842,10 +842,12 @@ 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);
	}
}


/*