diff options
author | Li RongQing <[email protected]> | 2019-03-29 09:18:02 +0800 |
---|---|---|
committer | David S. Miller <[email protected]> | 2019-03-29 13:41:55 -0700 |
commit | 3d8830266ffc28c16032b859e38a0252e014b631 (patch) | |
tree | c09e7bdb15135334481111a1ea485d07cada840c /tools/perf/scripts/python/syscall-counts-by-pid.py | |
parent | c43ac97bac987e56c179598ce3398a95d55067bc (diff) |
net: ethtool: not call vzalloc for zero sized memory request
NULL or ZERO_SIZE_PTR will be returned for zero sized memory
request, and derefencing them will lead to a segfault
so it is unnecessory to call vzalloc for zero sized memory
request and not call functions which maybe derefence the
NULL allocated memory
this also fixes a possible memory leak if phy_ethtool_get_stats
returns error, memory should be freed before exit
Signed-off-by: Li RongQing <[email protected]>
Reviewed-by: Wang Li <[email protected]>
Reviewed-by: Michal Kubecek <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts-by-pid.py')
0 files changed, 0 insertions, 0 deletions