Add return value check for pthread_attr_init.
Change-Id: Ie15633d16881934eeb2a1fab3775fb1f378d8330
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
Signed-off-by: EunBong Song <eunb.song@samsung.com>
return HTTP_ERROR;
}
- pthread_attr_init(&attr);
+ if (pthread_attr_init(&attr) != 0) {
+ HTTP_LOGE("Error: Cannot initialize ptread attribute\n");
+ return HTTP_ERROR;
+ }
pthread_attr_setschedpolicy(&attr, SCHED_RR);
pthread_attr_setstacksize(&attr, HTTP_LISTENING_HANDLER_STACKSIZE);