Gaurav Singh wrote:
> Memset() on the pointer right after malloc() can cause
> a null pointer dereference if it failed to allocate memory.
> Fix this by replacing malloc/memset with a single calloc().
>
> Signed-off-by: Gaurav Singh
> ---
> samples/bpf/xdp_monitor_user.c | 8 ++--
> 1 file c
Memset() on the pointer right after malloc() can cause
a null pointer dereference if it failed to allocate memory.
Fix this by replacing malloc/memset with a single calloc().
Signed-off-by: Gaurav Singh
---
samples/bpf/xdp_monitor_user.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions