[cheese/gnome-3-10] Fix memory leak in cheese_camera_device_get_caps()
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese/gnome-3-10] Fix memory leak in cheese_camera_device_get_caps()
- Date: Mon, 11 Nov 2013 18:37:01 +0000 (UTC)
commit f387ad582b74e33e7828ea7160e8152165996304
Author: David King <amigadave amigadave com>
Date: Tue Nov 5 23:32:27 2013 +0000
Fix memory leak in cheese_camera_device_get_caps()
libcheese/cheese-camera-device.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/libcheese/cheese-camera-device.c b/libcheese/cheese-camera-device.c
index b3b10ca..02f8537 100644
--- a/libcheese/cheese-camera-device.c
+++ b/libcheese/cheese-camera-device.c
@@ -548,7 +548,10 @@ cheese_camera_device_get_caps (CheeseCameraDevice *device)
GST_LOG ("Device: %s (%s)\n", priv->name, priv->device_node);
pad = gst_element_get_static_pad (src, "src");
caps = gst_pad_get_allowed_caps (pad);
+
+ gst_caps_unref (priv->caps);
priv->caps = cheese_camera_device_filter_caps (device, caps, supported_formats);
+
if (!gst_caps_is_empty (priv->caps))
cheese_camera_device_update_format_table (device);
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]