diff options
author | Xiaoke Wang <[email protected]> | 2022-09-12 10:50:26 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2022-09-24 13:08:41 +0200 |
commit | f63ed6cf93014c7fac56d82069801a26ab8b04a6 (patch) | |
tree | b1fba640b9b9f2eddd88c054d05b37815afd888d /lib/string_helpers.c | |
parent | 00def639882747aad89dfd095ea95f295ad034d3 (diff) |
staging: r8188eu: add kfree() on an error path of rtw_xmit_resource_alloc()
In rtw_xmit_resource_alloc(), if usb_alloc_urb() fails, then the memory
`pxmitbuf->pallocated_buf` which is allocated by kzalloc() is not properly
released before returning.
So this patch adds kfree() on the above error path to release it in time.
Tested-by: Philipp Hortmann <[email protected]> # Edimax N150
Reviewed-by: Martin Kaiser <[email protected]>
Signed-off-by: Xiaoke Wang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions