[farstream02] Pull some patches from upstream that fix serveral leaks.

Brian Pepple bpepple at fedoraproject.org
Wed Mar 27 16:20:23 UTC 2013


commit 4414a33fffcab53b73d04a8297054b2c6b61bafd
Author: Brian Pepple <bpepple at fedoraproject.org>
Date:   Wed Mar 27 12:20:18 2013 -0400

    Pull some patches from upstream that fix serveral leaks.

 0001-shm_fix_funnelpad_leak.patch                  |   26 ++++++++++++++++
 0002-shm_fix_candidate_leak.patch                  |   21 +++++++++++++
 0003-fs-rtp-substream-fix_leak_caps_on_error.patch |   22 ++++++++++++++
 0004-rtp-stream_plug_session_leak.patch            |   31 ++++++++++++++++++++
 0005-fs-codec-plug_memory_leak.patch               |   22 ++++++++++++++
 farstream02.spec                                   |   15 +++++++++-
 6 files changed, 136 insertions(+), 1 deletions(-)
---
diff --git a/0001-shm_fix_funnelpad_leak.patch b/0001-shm_fix_funnelpad_leak.patch
new file mode 100644
index 0000000..bcc6e86
--- /dev/null
+++ b/0001-shm_fix_funnelpad_leak.patch
@@ -0,0 +1,26 @@
+From 45b9a3fe974a72140cdfda21c0e98f16dd8cc4e6 Mon Sep 17 00:00:00 2001
+From: Olivier Crête <olivier.crete at collabora.com>
+Date: Thu, 28 Feb 2013 21:52:33 +0000
+Subject: shm: Fix funnelpad leak
+
+---
+diff --git a/transmitters/shm/fs-shm-transmitter.c b/transmitters/shm/fs-shm-transmitter.c
+index b548608..49cfdd9 100644
+--- a/transmitters/shm/fs-shm-transmitter.c
++++ b/transmitters/shm/fs-shm-transmitter.c
+@@ -695,6 +695,13 @@ fs_shm_transmitter_check_shm_src (FsShmTransmitter *self, ShmSrc *shm,
+     gst_pad_remove_probe (shm->funnelpad, shm->buffer_probe);
+   shm->buffer_probe = 0;
+ 
++  if (shm->funnelpad) {
++    gst_element_release_request_pad (self->priv->funnels[shm->component],
++        shm->funnelpad);
++    gst_object_unref (shm->funnelpad);
++  }
++  shm->funnelpad = NULL;
++
+   if (shm->src)
+   {
+     gst_element_set_locked_state (shm->src, TRUE);
+--
+cgit v0.9.0.3
diff --git a/0002-shm_fix_candidate_leak.patch b/0002-shm_fix_candidate_leak.patch
new file mode 100644
index 0000000..13ca26d
--- /dev/null
+++ b/0002-shm_fix_candidate_leak.patch
@@ -0,0 +1,21 @@
+From 1f9fcbdf164612d0d630bb3c903e7e70fe61693f Mon Sep 17 00:00:00 2001
+From: Olivier Crête <olivier.crete at collabora.com>
+Date: Thu, 28 Feb 2013 21:54:32 +0000
+Subject: shm: Fix candidate leak
+
+---
+diff --git a/transmitters/shm/fs-shm-stream-transmitter.c b/transmitters/shm/fs-shm-stream-transmitter.c
+index abc43b2..fd2192e 100644
+--- a/transmitters/shm/fs-shm-stream-transmitter.c
++++ b/transmitters/shm/fs-shm-stream-transmitter.c
+@@ -281,6 +281,8 @@ fs_shm_stream_transmitter_finalize (GObject *object)
+ {
+   FsShmStreamTransmitter *self = FS_SHM_STREAM_TRANSMITTER (object);
+ 
++  fs_candidate_list_destroy (self->priv->preferred_local_candidates);
++
+   g_free (self->priv->shm_src);
+   g_free (self->priv->shm_sink);
+   g_mutex_clear (&self->priv->mutex);
+--
+cgit v0.9.0.3
diff --git a/0003-fs-rtp-substream-fix_leak_caps_on_error.patch b/0003-fs-rtp-substream-fix_leak_caps_on_error.patch
new file mode 100644
index 0000000..642d079
--- /dev/null
+++ b/0003-fs-rtp-substream-fix_leak_caps_on_error.patch
@@ -0,0 +1,22 @@
+From bc8fd0624d7da549d1d76d02488d3fbe8e444b95 Mon Sep 17 00:00:00 2001
+From: Olivier Crête <olivier.crete at collabora.com>
+Date: Thu, 21 Mar 2013 21:47:04 +0000
+Subject: fs-rtp-substream: Don't leak caps on error
+
+Based on patch from Havard Graff
+---
+diff --git a/gst/fsrtpconference/fs-rtp-substream.c b/gst/fsrtpconference/fs-rtp-substream.c
+index c6768cf..e015675 100644
+--- a/gst/fsrtpconference/fs-rtp-substream.c
++++ b/gst/fsrtpconference/fs-rtp-substream.c
+@@ -1332,6 +1332,8 @@ _rtpbin_pad_blocked_callback (GstPad *pad, GstPadProbeInfo *info,
+   else
+     fs_session_emit_error (FS_SESSION (substream->priv->session),
+         FS_ERROR_CONSTRUCTION, error->message);
++  if (caps)
++    gst_caps_unref (caps);
+ 
+   goto out;
+ }
+--
+cgit v0.9.0.3
diff --git a/0004-rtp-stream_plug_session_leak.patch b/0004-rtp-stream_plug_session_leak.patch
new file mode 100644
index 0000000..957924a
--- /dev/null
+++ b/0004-rtp-stream_plug_session_leak.patch
@@ -0,0 +1,31 @@
+From eca3548baca2ba4fbed2addf960342d846936b39 Mon Sep 17 00:00:00 2001
+From: Havard Graff <havard.graff at gmail.com>
+Date: Thu, 21 Mar 2013 21:49:18 +0000
+Subject: rtp-stream: plug session leak
+
+---
+diff --git a/gst/fsrtpconference/fs-rtp-stream.c b/gst/fsrtpconference/fs-rtp-stream.c
+index 88cd558..1274459 100644
+--- a/gst/fsrtpconference/fs-rtp-stream.c
++++ b/gst/fsrtpconference/fs-rtp-stream.c
+@@ -1083,6 +1083,7 @@ fs_rtp_stream_set_transmitter (FsStream *stream,
+   if (self->priv->stream_transmitter)
+   {
+     FS_RTP_SESSION_UNLOCK (session);
++    g_object_unref (session);
+     return FALSE;
+   }
+   FS_RTP_SESSION_UNLOCK (session);
+@@ -1149,8 +1150,10 @@ fs_rtp_stream_set_transmitter (FsStream *stream,
+     self->priv->stream_transmitter = NULL;
+     FS_RTP_SESSION_UNLOCK (session);
+     g_object_unref (st);
++    g_object_unref (session);
+     return FALSE;
+   }
+ 
++  g_object_unref (session);
+   return TRUE;
+ }
+--
+cgit v0.9.0.3
diff --git a/0005-fs-codec-plug_memory_leak.patch b/0005-fs-codec-plug_memory_leak.patch
new file mode 100644
index 0000000..269787b
--- /dev/null
+++ b/0005-fs-codec-plug_memory_leak.patch
@@ -0,0 +1,22 @@
+From fdf07e579b90760f1e2cdcd1a4c4a9b3476009af Mon Sep 17 00:00:00 2001
+From: Havard Graff <havard.graff at gmail.com>
+Date: Thu, 21 Mar 2013 21:50:51 +0000
+Subject: fs-codec: plug memory leak
+
+encoding_name is already g_strdup'ed in codec_new
+---
+diff --git a/farstream/fs-codec.c b/farstream/fs-codec.c
+index c21a085..43704ce 100644
+--- a/farstream/fs-codec.c
++++ b/farstream/fs-codec.c
+@@ -182,8 +182,6 @@ fs_codec_copy (const FsCodec * codec)
+   copy->channels = codec->channels;
+   copy->minimum_reporting_interval = codec->minimum_reporting_interval;
+ 
+-  copy->encoding_name = g_strdup (codec->encoding_name);
+-
+   for (lp = codec->optional_params; lp; lp = g_list_next (lp))
+   {
+     FsCodecParameter *param_copy;
+--
+cgit v0.9.0.3
diff --git a/farstream02.spec b/farstream02.spec
index 0adb443..b608bfb 100644
--- a/farstream02.spec
+++ b/farstream02.spec
@@ -4,13 +4,18 @@
 
 Name:           %{far}02
 Version:        0.2.2
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Libraries for videoconferencing
 
 # Package is LGPLv2 except for a few files in /common/coverage/
 License:        LGPLv2+ and GPLv2+
 URL:            http://www.freedesktop.org/wiki/Software/Farstream
 Source0:        http://freedesktop.org/software/%{far}/releases/%{far}/%{far}-%{version}.tar.gz
+Patch0:         0001-shm_fix_funnelpad_leak.patch
+Patch1:         0002-shm_fix_candidate_leak.patch
+Patch2:         0003-fs-rtp-substream-fix_leak_caps_on_error.patch
+Patch3:         0004-rtp-stream_plug_session_leak.patch
+Patch4:         0005-fs-codec-plug_memory_leak.patch
 
 BuildRequires:  libnice-devel >= 0.1.3
 BuildRequires:  gstreamer1-devel >= %{gst_ver}
@@ -44,6 +49,11 @@ developing applications that use %{name}.
 
 %prep
 %setup -q -n %{far}-%{version}
+%patch0 -p1 -b .funnelpad
+%patch1 -p1 -b .candidate
+%patch2 -p1 -b .substream
+%patch3 -p1 -b .rtp-stream
+%patch4 -p1 -b .fs-codec
 
 
 %build
@@ -97,6 +107,9 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
 
 
 %changelog
+* Wed Mar 27 2013 Brian Pepple <bpepple at fedoraproject.org> - 0.2.2-3
+- Pull some patches from upstream that fix serveral leaks.
+
 * Wed Feb 13 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.2.2-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 


More information about the scm-commits mailing list