[cheese/wip/fixes: 7/8] Fix memory leak in cheese_camera_device_get_caps()
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese/wip/fixes: 7/8] Fix memory leak in cheese_camera_device_get_caps()
- Date: Tue, 5 Nov 2013 23:59:03 +0000 (UTC)
commit 71f0998d09b43ea55f94f771171409c13d742290
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]