posix/aio_misc.c: changed malloc call into calloc

Coverity CID 1512510

Changed a call to malloc() into a call to calloc()
to avoid access to uninitialized memory.

Closes #5131.
This commit is contained in:
alessandronardin
2024-09-24 18:52:25 +02:00
committed by Amar Takhar
parent 9eb23924e8
commit de196e0586

View File

@@ -296,7 +296,7 @@ rtems_aio_request_chain *rtems_aio_search_fd(
if ( create == 0 ) {
r_chain = NULL;
} else {
r_chain = malloc( sizeof( rtems_aio_request_chain ) );
r_chain = calloc( 1, sizeof( rtems_aio_request_chain ) );
rtems_chain_initialize_empty( &r_chain->perfd );
rtems_chain_initialize_node( &r_chain->next_fd );