aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2013-09-12 15:24:32 +0100
committerStefan Schmidt <s.schmidt@samsung.com>2013-09-12 15:26:34 +0100
commitd54bfd7e1db66a7cc8b57669257dcfaf98ab95af (patch)
treea6a6395ae32802619ed5f3d9936850860d822e7b
parentReduce unnecessary pointer frame callbacks (diff)
downloadefl-d54bfd7e1db66a7cc8b57669257dcfaf98ab95af.tar.gz
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
-rw-r--r--src/lib/emotion/emotion_webcam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/emotion/emotion_webcam.c b/src/lib/emotion/emotion_webcam.c
index a0f81c74ca..52e6b5b457 100644
--- a/src/lib/emotion/emotion_webcam.c
+++ b/src/lib/emotion/emotion_webcam.c
@@ -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;