diff --git a/portable/ThirdParty/GCC/Posix/utils/wait_for_event.c b/portable/ThirdParty/GCC/Posix/utils/wait_for_event.c index 40a428df0d2..bf744e27f37 100644 --- a/portable/ThirdParty/GCC/Posix/utils/wait_for_event.c +++ b/portable/ThirdParty/GCC/Posix/utils/wait_for_event.c @@ -43,12 +43,13 @@ struct event * event_create( void ) { struct event * ev = malloc( sizeof( struct event ) ); - if( ev ) + if( ev != NULL ) { ev->event_triggered = false; pthread_mutex_init( &ev->mutex, NULL ); pthread_cond_init( &ev->cond, NULL ); } + return ev; }