diff options
author | Alan Stern <[email protected]> | 2020-12-02 18:20:04 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <[email protected]> | 2020-12-07 15:00:15 +0100 |
commit | e469d0b09a19496e1972a20974bbf55b728151eb (patch) | |
tree | 4f687619c64c65de9e11d1a2e352c7cad723d027 /tools/perf/scripts/python/syscall-counts.py | |
parent | 2b006e748c81da1b32029257d003f9b2af7435a5 (diff) |
media: gspca: Fix memory leak in probe
The gspca driver leaks memory when a probe fails. gspca_dev_probe2()
calls v4l2_device_register(), which takes a reference to the
underlying device node (in this case, a USB interface). But the
failure pathway neglects to call v4l2_device_unregister(), the routine
responsible for dropping this reference. Consequently the memory for
the USB interface and its device never gets released.
This patch adds the missing function call.
Reported-and-tested-by: [email protected]
Signed-off-by: Alan Stern <[email protected]>
CC: <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions