Li RongQing
3d8830266f
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 <lirongqing@baidu.com>
Reviewed-by: Wang Li <wangli39@baidu.com>
Reviewed-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-03-29 13:41:55 -07:00
..
2019-01-22 09:51:19 +01:00
2019-03-13 11:50:04 +01:00
2019-02-24 17:40:46 -08:00
2019-03-15 11:25:48 -07:00
2019-03-07 10:14:50 -08:00
2019-01-23 11:18:00 -08:00
2019-03-25 09:31:19 +01:00
2019-02-26 10:08:26 +01:00
2019-03-08 21:17:07 +01:00
2019-02-23 13:34:40 -08:00
2019-03-18 16:21:54 +01:00
2019-02-17 11:01:17 -08:00
2019-01-22 11:33:46 +01:00
2019-03-20 16:27:40 +01:00
2019-03-29 13:41:55 -07:00
2018-07-27 13:17:50 -07:00
2019-03-19 14:01:40 -07:00
2019-01-29 21:18:54 -08:00
2018-10-04 09:40:52 -07:00
2019-03-28 16:57:19 -07:00
2019-02-22 12:55:31 -08:00
2019-03-07 11:02:08 -08:00
2019-02-26 08:27:05 -08:00
2018-04-22 21:12:00 -04:00
2019-03-11 15:36:49 -07:00
2019-03-27 22:46:16 -07:00
2018-11-10 16:55:11 -08:00
2019-02-23 13:46:24 -08:00
2019-02-12 10:36:42 +01:00
2019-03-13 14:19:35 -07:00
2018-12-03 14:15:26 -08:00
2018-10-22 19:59:20 -07:00
2019-02-24 12:06:19 -08:00
2018-09-28 12:46:07 +08:00
2019-03-19 16:00:22 -07:00
2019-03-16 11:44:33 -07:00
2019-03-20 08:32:58 +01:00
2019-02-27 21:45:24 -08:00
2019-03-21 09:29:06 -07:00
2019-01-27 10:38:04 -08:00
2019-03-19 13:48:07 -07:00
2018-07-12 16:55:29 -07:00
2019-03-28 17:15:44 -07:00
2019-03-20 10:46:50 -07:00
2019-02-21 16:23:56 -08:00
2019-03-05 21:07:14 -08:00
2019-03-28 17:17:18 -07:00
2018-12-18 13:13:56 +01:00
2019-03-18 16:53:22 -07:00
2019-03-23 21:48:30 -04:00
2019-03-26 11:17:09 -07:00
2019-03-20 11:09:47 -07:00
2019-03-12 13:27:20 -07:00
2019-03-15 12:51:56 -07:00
2019-03-26 13:04:32 -07:00
2019-03-01 21:35:19 -08:00
2019-03-26 11:21:20 -07:00
2019-03-29 13:38:50 -07:00
2019-03-08 14:48:40 -08:00
2019-03-08 15:15:44 -08:00
2018-07-24 14:10:42 -07:00
2019-02-22 13:48:13 +01:00
2019-03-11 15:40:14 -07:00
2019-03-16 01:27:51 +01:00
2019-02-18 10:58:54 +01:00
2019-03-05 14:08:26 -08:00
2019-02-26 08:49:05 -08:00
2019-02-28 08:24:23 -07:00
2019-03-15 15:29:47 -07:00