eina thread - check return of pthread_attr_init
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Sat, 19 Sep 2020 22:37:22 +0000 (23:37 +0100)
committerJongmin Lee <jm105.lee@samsung.com>
Sun, 20 Sep 2020 21:15:36 +0000 (06:15 +0900)
fix CID 1401031

src/lib/eina/eina_thread.c

index 369711f..18e7ac5 100644 (file)
@@ -66,7 +66,10 @@ _eina_thread_create(Eina_Thread *t, int affinity, void *(*func)(void *data), voi
    sigset_t oldset, newset;
 #endif
 
-   pthread_attr_init(&attr);
+   if (pthread_attr_init(&attr) != 0)
+     {
+        return EINA_FALSE;
+     }
    if (affinity >= 0)
      {
 #ifdef EINA_HAVE_PTHREAD_AFFINITY