blkparse: fix incorrectly sized memset in check_cpu_map
authorJeff Mahoney <jeffm@suse.com>
Thu, 21 Oct 2021 14:16:20 +0000 (10:16 -0400)
committerJens Axboe <axboe@kernel.dk>
Thu, 21 Oct 2021 14:45:17 +0000 (08:45 -0600)
commit7f5d2c5173d72018aa29c583c9291ef10abaf8df
tree67080ec79a2558d07a2ee245cf2967ca40214700
parentac416ab67cd7add0089c3bc668427e6b909eb59e
blkparse: fix incorrectly sized memset in check_cpu_map

The memset call in check_cpu_map always clears sizeof(unsigned long *)
regardless of what size was allocated.  Use calloc instead to allocate
the map so it's zeroed properly regardless of the size requested.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
blkparse.c