aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/export-to-postgresql-report
diff options
context:
space:
mode:
authorColin Ian King <[email protected]>2019-01-16 16:28:59 +0000
committerSteve French <[email protected]>2019-01-24 09:37:33 -0600
commit73aaf920cc72024c4a4460cfa46d56e5014172f3 (patch)
tree6bf117b2d46852bc042fca28fd0193c5b449a4fb /tools/perf/scripts/python/bin/export-to-postgresql-report
parent30bac164aca750892b93eef350439a0562a68647 (diff)
cifs: fix memory leak of an allocated cifs_ntsd structure
The call to SMB2_queary_acl can allocate memory to pntsd and also return a failure via a call to SMB2_query_acl (and then query_info). This occurs when query_info allocates the structure and then in query_info the call to smb2_validate_and_copy_iov fails. Currently the failure just returns without kfree'ing pntsd hence causing a memory leak. Currently, *data is allocated if it's not already pointing to a buffer, so it needs to be kfree'd only if was allocated in query_info, so the fix adds an allocated flag to track this. Also set *dlen to zero on an error just to be safe since *data is kfree'd. Also set errno to -ENOMEM if the allocation of *data fails. Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Steve French <[email protected]> Reviewed-by: Dan Carpener <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-postgresql-report')
0 files changed, 0 insertions, 0 deletions