forked from enlightenment/efl
emotion: Avoid leak by also checking for fd being null.
If fd would be null here we would leak the fd handle. Fix the check. CID: 1039175
This commit is contained in:
parent
0d0944c4cc
commit
d54bfd7e1d
|
@ -123,7 +123,7 @@ _emotion_check_device(Emotion_Webcam *ew)
|
|||
|
||||
EINA_REFCOUNT_INIT(ew);
|
||||
|
||||
if (fd > 0) close(fd);
|
||||
if (fd >= 0) close(fd);
|
||||
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue