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:
Stefan Schmidt 2013-09-12 15:24:32 +01:00
parent 0d0944c4cc
commit d54bfd7e1d
1 changed files with 1 additions and 1 deletions

View File

@ -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;