rtla/utils: Use calloc and check the potential memory allocation failure
Replace malloc with calloc and add memory allocating check of mon_cpus before used. Link: https://lkml.kernel.org/r/20220615073348.6891-1-jianchunfu@cmss.chinamobile.com Fixes: 7d0dc957 ("rtla/timerlat: Add --dma-latency option") Signed-off-by: jianchunfu <jianchunfu@cmss.chinamobile.com> Acked-by: Daniel Bristot de Oliveira <bristot@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Showing
Please register or sign in to comment