aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaluca Elena Podiuc <ralucaelena1985@gmail.com>2011-12-01 05:12:06 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-12-01 17:37:50 +0800
commitb1e73b93c00a06152a52ce5e41f063655e2f5c13 (patch)
treea59809c2c27c9a8987fd2b02cdd991ee11b06dd2
parent2d4ca2150069139ab347bddce5a5c9264c1be3b1 (diff)
downloadgsoc2013-empathy-b1e73b93c00a06152a52ce5e41f063655e2f5c13.tar
gsoc2013-empathy-b1e73b93c00a06152a52ce5e41f063655e2f5c13.tar.gz
gsoc2013-empathy-b1e73b93c00a06152a52ce5e41f063655e2f5c13.tar.bz2
gsoc2013-empathy-b1e73b93c00a06152a52ce5e41f063655e2f5c13.tar.lz
gsoc2013-empathy-b1e73b93c00a06152a52ce5e41f063655e2f5c13.tar.xz
gsoc2013-empathy-b1e73b93c00a06152a52ce5e41f063655e2f5c13.tar.zst
gsoc2013-empathy-b1e73b93c00a06152a52ce5e41f063655e2f5c13.zip
camera-monitor: fix memleak in on_camera_added
https://bugzilla.gnome.org/show_bug.cgi?id=665256
-rw-r--r--libempathy/empathy-camera-monitor.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libempathy/empathy-camera-monitor.c b/libempathy/empathy-camera-monitor.c
index 7d9d695e8..a92349c92 100644
--- a/libempathy/empathy-camera-monitor.c
+++ b/libempathy/empathy-camera-monitor.c
@@ -115,11 +115,13 @@ on_camera_added (CheeseCameraDeviceMonitor *device,
gint api_version,
EmpathyCameraMonitor *self)
{
- EmpathyCamera *camera = empathy_camera_new (id, filename, product_name);
+ EmpathyCamera *camera;
if (self->priv->cameras == NULL)
return;
+ camera = empathy_camera_new (id, filename, product_name);
+
g_queue_push_tail (self->priv->cameras, camera);
self->priv->num_cameras++;