mirror of
https://github.com/torvalds/linux.git
synced 2026-10-16 04:39:02 +02:00
zoran_init_video_device() installs zoran_vdev_release() as the
video_device release callback through zoran_template. After
video_register_device() succeeds, video_unregister_device() drops the
registered video_device reference and the V4L2 core eventually invokes
that release callback, which kfree()s the video_device.
zoran_exit_video_devices() called video_unregister_device() and then
kfree(zr->video_dev), so device teardown could free the same
video_device twice.
Remove the direct kfree() and clear the cached pointer after
unregistering. The pre-registration failure path keeps its manual free
because the video_device was not registered there.
This issue was found by a static analysis checker and confirmed by
manual source review.
Fixes:
|
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| videocodec.c | ||
| videocodec.h | ||
| zoran_card.c | ||
| zoran_card.h | ||
| zoran_device.c | ||
| zoran_device.h | ||
| zoran_driver.c | ||
| zoran.h | ||
| zr36016.c | ||
| zr36016.h | ||
| zr36050.c | ||
| zr36050.h | ||
| zr36057.h | ||
| zr36060.c | ||
| zr36060.h | ||