diff --git a/demos/ota/ota_demo_core_http/ota_demo_core_http.c b/demos/ota/ota_demo_core_http/ota_demo_core_http.c index b26a086306..56ccbc0d8a 100644 --- a/demos/ota/ota_demo_core_http/ota_demo_core_http.c +++ b/demos/ota/ota_demo_core_http/ota_demo_core_http.c @@ -1944,8 +1944,8 @@ static void * otaThread( void * pParam ) /* Calling OTA agent task. */ OTA_EventProcessingTask( pParam ); LogInfo( ( "OTA Agent stopped." ) ); - pthread_detach(pthread_self()); - pthread_exit(NULL); + pthread_detach( pthread_self() ); + pthread_exit( NULL ); return NULL; }