summaryrefslogtreecommitdiffstats
path: root/Documentation/dvb/get_dvb_firmware
diff options
context:
space:
mode:
authorAnatolij Gustschin2010-07-01 19:21:39 +0200
committerMauro Carvalho Chehab2010-08-02 20:36:02 +0200
commit1bb6419433433e845f7bc47651ad246b2e65c6fa (patch)
tree56d9feec496430d29a450480d3908ea380daed92 /Documentation/dvb/get_dvb_firmware
parentV4L/DVB: dvb_frontend: fix typos in comments and one function (diff)
downloadkernel-qcow2-linux-1bb6419433433e845f7bc47651ad246b2e65c6fa.tar.gz
kernel-qcow2-linux-1bb6419433433e845f7bc47651ad246b2e65c6fa.tar.xz
kernel-qcow2-linux-1bb6419433433e845f7bc47651ad246b2e65c6fa.zip
V4L/DVB: v4l2-dev: fix memory leak
Since commit b4028437876866aba4747a655ede00f892089e14 the 'driver_data' field resides in device's struct device_private which may be allocated by dev_set_drvdata() if device_private struct was not allocated previously. dev_set_drvdata() is used in video_set_drvdata() to set the driver's private data pointer in v4l2 drivers. Setting the private data _before_ registering the v4l2 device results in a memory leak since __video_register_device() also calls video_set_drvdata(), but after zeroing the device structure. Thus, the reference to the previously allocated device_private struct goes lost and a new device_private will be allocated. All v4l drivers which call video_set_drvdata() _before_ calling video_register_device() are affected. The patch fixes __video_register_device() to preserve previously allocated device_private reference. Caught by kmemleak. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'Documentation/dvb/get_dvb_firmware')
0 files changed, 0 insertions, 0 deletions