ecore - efl thread - dont close invalid < 0 fd's accepted/tizen/unified/20200923.024107 submit/tizen/20200920.213436
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Sat, 19 Sep 2020 23:06:30 +0000 (00:06 +0100)
committerJongmin Lee <jm105.lee@samsung.com>
Sun, 20 Sep 2020 21:15:36 +0000 (06:15 +0900)
fix CID 1396951

src/lib/ecore/efl_thread.c

index ad1f029..caae3af 100644 (file)
@@ -826,8 +826,8 @@ _efl_thread_efl_task_run(Eo *obj, Efl_Thread_Data *pd)
         close(pd->fd.out);
         close(pd->ctrl.in);
         close(pd->ctrl.out);
-        close(thdat->fd.in);
-        close(thdat->fd.out);
+        if (thdat->fd.in >= 0) close(thdat->fd.in);
+        if (thdat->fd.out >= 0) close(thdat->fd.out);
         close(thdat->ctrl.in);
         close(thdat->ctrl.out);
         free(thdat);