diff options
| author | Muhammad Usama Anjum <[email protected]> | 2021-04-01 17:54:43 +0900 |
|---|---|---|
| committer | Steve French <[email protected]> | 2021-05-10 19:15:35 -0500 |
| commit | c250e8f5566f2e1a0ea177837520eff8e59c0b7d (patch) | |
| tree | dd2bef477a5f807ab414d2982ab1599284677318 /tools/perf/scripts/python/bin | |
| parent | 5da64d8784d36c0601743a5159a598f5888089c7 (diff) | |
cifsd: fix memory leak when loop ends
Memory is being allocated and if veto_list is zero, the loop breaks
without cleaning up the allocated memory. In this patch, the length
check has been moved before allocation. If loop breaks, the memory isn't
allocated in the first place. Thus the memory is being protected from
leaking.
Reported-by: coverity-bot <[email protected]>
Addresses-Coverity-ID: 1503590 ("Resource leaks")
Signed-off-by: Muhammad Usama Anjum <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>
Signed-off-by: Steve French <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions