fix fd leak in emotion webcam where fd of value 0 never closed

fixes CID 1039175
This commit is contained in:
Carsten Haitzler 2013-12-13 21:15:01 +09:00
parent c6119802d1
commit 5d6e30fae0
1 changed files with 1 additions and 1 deletions

View File

@ -143,7 +143,7 @@ _emotion_check_device(Emotion_Webcam *ew)
eina_stringshare_del(ew->name);
free(ew);
#ifdef HAVE_V4L2
if (fd > 0) close(fd);
if (fd >= 0) close(fd);
#endif
return EINA_FALSE;
}