diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2011-06-02 10:41:52 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2011-06-02 10:41:52 +0200 |
commit | e376913fc3e914b5fe940ceb4a84357ff9334779 (patch) | |
tree | 25647c2af0050f7547bfa1b230931a6546ded76f /ext/soup | |
parent | 0672232b260096c8879698cae633f6c55fde217a (diff) |
souphttpsink: Fix refcounting of the "session" property
Properties should never take ownership of the values
passed to them.
Diffstat (limited to 'ext/soup')
-rw-r--r-- | ext/soup/gstsouphttpsink.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/soup/gstsouphttpsink.c b/ext/soup/gstsouphttpsink.c index 509d689c86..04af372bf9 100644 --- a/ext/soup/gstsouphttpsink.c +++ b/ext/soup/gstsouphttpsink.c @@ -249,7 +249,7 @@ gst_soup_http_sink_set_property (GObject * object, guint property_id, if (souphttpsink->prop_session) { g_object_unref (souphttpsink->prop_session); } - souphttpsink->prop_session = g_value_get_object (value); + souphttpsink->prop_session = g_value_dup_object (value); break; case PROP_LOCATION: g_free (souphttpsink->location); @@ -327,9 +327,12 @@ gst_soup_http_sink_get_property (GObject * object, guint property_id, void gst_soup_http_sink_dispose (GObject * object) { - /* GstSoupHttpSink *souphttpsink = GST_SOUP_HTTP_SINK (object); */ + GstSoupHttpSink *souphttpsink = GST_SOUP_HTTP_SINK (object); /* clean up as possible. may be called multiple times */ + if (souphttpsink->prop_session) + g_object_unref (souphttpsink->prop_session); + souphttpsink->prop_session = NULL; G_OBJECT_CLASS (parent_class)->dispose (object); } |