summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorJethro Donaldson <devel@jro.nz>2025-05-15 01:23:23 +1200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-05-22 14:31:54 +0200
commit19260d3fa670e64e88cb67400f30512600f886d9 (patch)
treec9cc4deb4c4e8238a4acd9f1a7351d7bab4e751a /tools/perf/scripts/python/stackcollapse.py
parente604dfc95c77c3a8f035b4b2b703bdb62ad85441 (diff)
smb: client: fix memory leak during error handling for POSIX mkdir
commit 1fe4a44b7fa3955bcb7b4067c07b778fe90d8ee7 upstream. The response buffer for the CREATE request handled by smb311_posix_mkdir() is leaked on the error path (goto err_free_rsp_buf) because the structure pointer *rsp passed to free_rsp_buf() is not assigned until *after* the error condition is checked. As *rsp is initialised to NULL, free_rsp_buf() becomes a no-op and the leak is instead reported by __kmem_cache_shutdown() upon subsequent rmmod of cifs.ko if (and only if) the error path has been hit. Pass rsp_iov.iov_base to free_rsp_buf() instead, similar to the code in other functions in smb2pdu.c for which *rsp is assigned late. Cc: stable@vger.kernel.org Signed-off-by: Jethro Donaldson <devel@jro.nz> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions