Re: [PATCH] xdp_rxq_info_user: Add null check after malloc

2020-06-11 Thread Daniel Borkmann
On 6/10/20 5:01 AM, Gaurav Singh wrote: Signed-off-by: Gaurav Singh The memset call is made right after malloc call which can return a NULL pointer upon failure causing a segmentation fault. Fix this by adding a null check right after malloc() and then do memset(). The SoB should come after

[PATCH] xdp_rxq_info_user: Add null check after malloc

2020-06-09 Thread Gaurav Singh
Signed-off-by: Gaurav Singh The memset call is made right after malloc call which can return a NULL pointer upon failure causing a segmentation fault. Fix this by adding a null check right after malloc() and then do memset(). --- samples/bpf/xdp_rxq_info_user.c | 6 +++--- 1 file changed, 3