From b1e73b93c00a06152a52ce5e41f063655e2f5c13 Mon Sep 17 00:00:00 2001 From: Raluca Elena Podiuc Date: Wed, 30 Nov 2011 23:12:06 +0200 Subject: camera-monitor: fix memleak in on_camera_added https://bugzilla.gnome.org/show_bug.cgi?id=665256 --- libempathy/empathy-camera-monitor.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libempathy') 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++; -- cgit v1.2.3