diff options
| author | Miaoqian Lin <[email protected]> | 2025-10-27 15:09:34 +0000 |
|---|---|---|
| committer | Herbert Xu <[email protected]> | 2025-11-06 06:29:49 +0000 |
| commit | 59b0afd01b2ce353ab422ea9c8375b03db313a21 (patch) | |
| tree | 1536135691d7189799cab5204309593b61eab17e /net/unix/af_unix.c | |
| parent | crypto: aspeed - fix double free caused by devm (diff) | |
| download | kernel-59b0afd01b2ce353ab422ea9c8375b03db313a21.tar.gz kernel-59b0afd01b2ce353ab422ea9c8375b03db313a21.zip | |
crypto: hisilicon/qm - Fix device reference leak in qm_get_qos_value
The qm_get_qos_value() function calls bus_find_device_by_name() which
increases the device reference count, but fails to call put_device()
to balance the reference count and lead to a device reference leak.
Add put_device() calls in both the error path and success path to
properly balance the reference count.
Found via static analysis.
Fixes: 22d7a6c39cab ("crypto: hisilicon/qm - add pci bdf number check")
Cc: [email protected]
Signed-off-by: Miaoqian Lin <[email protected]>
Reviewed-by: Longfang Liu <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
