summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/vmalloc.py
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2022-11-10 18:19:17 +0300
committerJon Mason <jdmason@kudzu.us>2023-07-08 17:51:55 +0300
commit8623ccbfc55d962e19a3537652803676ad7acb90 (patch)
tree245ee8a6c8ac311702e936be7a9eeb03d0e6cd9b /scripts/gdb/linux/vmalloc.py
parent4c3c796aca02883ad35bb117468938cc4022ca41 (diff)
downloadlinux-8623ccbfc55d962e19a3537652803676ad7acb90.tar.xz
NTB: ntb_transport: fix possible memory leak while device_register() fails
If device_register() returns error, the name allocated by dev_set_name() need be freed. As comment of device_register() says, it should use put_device() to give up the reference in the error path. So fix this by calling put_device(), then the name can be freed in kobject_cleanup(), and client_dev is freed in ntb_transport_client_release(). Fixes: fce8a7bb5b4b ("PCI-Express Non-Transparent Bridge Support") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'scripts/gdb/linux/vmalloc.py')
0 files changed, 0 insertions, 0 deletions