summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@samsung.com>2013-12-13 12:22:06 +0900
committerCedric BAIL <cedric.bail@samsung.com>2013-12-13 12:22:06 +0900
commit96c1d15ac04195a2fbee17294aae5a0ac3a3e1a1 (patch)
treee02eadb1b6bb39c1b5ebd023d053e0be078eb154 /src/lib
parentf6c4513da47945eeeea3283fa66eefd388d0e079 (diff)
emotion: fix potential memory leak when webcam register fail.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/emotion/emotion_webcam.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/emotion/emotion_webcam.c b/src/lib/emotion/emotion_webcam.c
index 49992c30f4..974a9a8ca0 100644
--- a/src/lib/emotion/emotion_webcam.c
+++ b/src/lib/emotion/emotion_webcam.c
@@ -226,8 +226,13 @@ _emotion_eeze_events(const char *syspath,
226 Emotion_Webcam *test; 226 Emotion_Webcam *test;
227 227
228 test = _emotion_webcam_new(syspath); 228 test = _emotion_webcam_new(syspath);
229 if ((test) && (_emotion_check_device(test))) 229 if (test)
230 ecore_event_add(EMOTION_WEBCAM_ADD, test, NULL, NULL); 230 {
231 if (_emotion_check_device(test))
232 ecore_event_add(EMOTION_WEBCAM_ADD, test, NULL, NULL);
233 else
234 _emotion_webcam_remove_cb(test, NULL);
235 }
231 } 236 }
232 ecore_event_add(EMOTION_WEBCAM_UPDATE, NULL, NULL, NULL); 237 ecore_event_add(EMOTION_WEBCAM_UPDATE, NULL, NULL, NULL);
233} 238}