summaryrefslogtreecommitdiff
path: root/src/lib/emotion
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 /src/lib/emotion
parent0d0944c4ccee3f27cf3769ecf94e408594ac135c (diff)
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
Diffstat (limited to 'src/lib/emotion')
-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)
123 123
124 EINA_REFCOUNT_INIT(ew); 124 EINA_REFCOUNT_INIT(ew);
125 125
126 if (fd > 0) close(fd); 126 if (fd >= 0) close(fd);
127 127
128 return; 128 return;
129 129