[farsight2/master] Fix some small leaks

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:22:29 PST 2008


---
 gst/fsrtpconference/fs-rtp-codec-cache.c          |    1 +
 gst/fsrtpconference/fs-rtp-discover-codecs.c      |    2 ++
 transmitters/multicast/fs-multicast-transmitter.c |    1 +
 transmitters/rawudp/fs-rawudp-component.c         |    3 ++-
 4 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-codec-cache.c b/gst/fsrtpconference/fs-rtp-codec-cache.c
index c44f296..fe091df 100644
--- a/gst/fsrtpconference/fs-rtp-codec-cache.c
+++ b/gst/fsrtpconference/fs-rtp-codec-cache.c
@@ -555,6 +555,7 @@ save_codecs_cache (FsMediaType media_type, GList *blueprints)
   }
 
   g_free (tmp_path);
+  g_free (cache_path);
   GST_DEBUG ("Wrote binary codecs cache");
   return TRUE;
 }
diff --git a/gst/fsrtpconference/fs-rtp-discover-codecs.c b/gst/fsrtpconference/fs-rtp-discover-codecs.c
index a10b4d0..ce60e97 100644
--- a/gst/fsrtpconference/fs-rtp-discover-codecs.c
+++ b/gst/fsrtpconference/fs-rtp-discover-codecs.c
@@ -833,6 +833,8 @@ codec_cap_list_intersect (GList *list1, GList *list2)
         if (item) {
           GstCaps *new_caps = gst_caps_union (item->caps, intersection);
           GList *tmplist;
+
+          gst_caps_unref (item->caps);
           item->caps = new_caps;
 
           for (tmplist = g_list_first (codec_cap2->element_list1->data);
diff --git a/transmitters/multicast/fs-multicast-transmitter.c b/transmitters/multicast/fs-multicast-transmitter.c
index e41c281..63b3e27 100644
--- a/transmitters/multicast/fs-multicast-transmitter.c
+++ b/transmitters/multicast/fs-multicast-transmitter.c
@@ -911,6 +911,7 @@ fs_multicast_transmitter_put_udpsock (FsMulticastTransmitter *trans,
   if (udpsock->fd >= 0)
     close (udpsock->fd);
 
+  g_free (udpsock->multicast_ip);
   g_free (udpsock->local_ip);
   g_free (udpsock);
 }
diff --git a/transmitters/rawudp/fs-rawudp-component.c b/transmitters/rawudp/fs-rawudp-component.c
index e63ebd7..21b0781 100644
--- a/transmitters/rawudp/fs-rawudp-component.c
+++ b/transmitters/rawudp/fs-rawudp-component.c
@@ -556,8 +556,9 @@ fs_rawudp_component_set_property (GObject *object,
           else
             fs_rawudp_transmitter_udpport_remove_dest (self->priv->udpport,
                 candidate->ip, candidate->port);
-          fs_candidate_destroy (candidate);
         }
+        if (candidate)
+          fs_candidate_destroy (candidate);
       }
       break;
     case PROP_IP:
-- 
1.5.6.5




More information about the farsight-commits mailing list