diff options
| author | Ma Ke <[email protected]> | 2025-09-23 01:36:03 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2025-10-13 08:55:03 +0000 |
| commit | b1aabb8ef09b4cf0cc0c92ca9dfd19482f3192c1 (patch) | |
| tree | c0e6b436b90ff4a8ed2db9d30ddbfe9cf67ef852 /lib/test_fortify/write_overflow-strlcpy-src.c | |
| parent | staging: gpib: Return -EINTR on device clear (diff) | |
| download | kernel-b1aabb8ef09b4cf0cc0c92ca9dfd19482f3192c1.tar.gz kernel-b1aabb8ef09b4cf0cc0c92ca9dfd19482f3192c1.zip | |
staging: gpib: Fix device reference leak in fmh_gpib driver
The fmh_gpib driver contains a device reference count leak in
fmh_gpib_attach_impl() where driver_find_device() increases the
reference count of the device by get_device() when matching but this
reference is not properly decreased. Add put_device() in
fmh_gpib_detach(), which ensures that the reference count of the
device is correctly managed.
Found by code review.
Cc: stable <[email protected]>
Fixes: 8e4841a0888c ("staging: gpib: Add Frank Mori Hess FPGA PCI GPIB driver")
Signed-off-by: Ma Ke <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strlcpy-src.c')
0 files changed, 0 insertions, 0 deletions
