diff --git a/src/lib/emotion/emotion_webcam.c b/src/lib/emotion/emotion_webcam.c index 9b6d502099..a0f81c74ca 100644 --- a/src/lib/emotion/emotion_webcam.c +++ b/src/lib/emotion/emotion_webcam.c @@ -3,6 +3,7 @@ #endif #ifdef HAVE_EEZE +# include # include # include # include @@ -95,7 +96,7 @@ _emotion_check_device(Emotion_Webcam *ew) Emotion_Webcam *check; Eina_List *l; struct v4l2_capability caps; - int fd; + int fd = -1; #endif if (!ew) return; @@ -133,7 +134,9 @@ _emotion_check_device(Emotion_Webcam *ew) eina_stringshare_del(ew->device); eina_stringshare_del(ew->name); free(ew); +#ifdef HAVE_V4L2 if (fd > 0) close(fd); +#endif } static Emotion_Webcam *