linsyssdi: fix leaks

This commit is contained in:
Vincent Penquerc'h 2012-01-13 10:32:59 +00:00
parent 08bce008b0
commit 525a995569
2 changed files with 9 additions and 1 deletions

View file

@ -196,9 +196,14 @@ gst_linsys_sdi_sink_get_property (GObject * object, guint property_id,
void
gst_linsys_sdi_sink_dispose (GObject * object)
{
GstLinsysSdiSink *linsyssdisink;
g_return_if_fail (GST_IS_LINSYS_SDI_SINK (object));
linsyssdisink = GST_LINSYS_SDI_SINK (object);
/* clean up as possible. may be called multiple times */
g_free (linsyssdisink->device);
linsyssdisink->device = NULL;
G_OBJECT_CLASS (parent_class)->dispose (object);
}

View file

@ -212,9 +212,12 @@ gst_linsys_sdi_src_get_property (GObject * object, guint property_id,
void
gst_linsys_sdi_src_dispose (GObject * object)
{
g_return_if_fail (GST_IS_LINSYS_SDI_SRC (object));
GstLinsysSdiSrc *linsyssdisrc = GST_LINSYS_SDI_SRC (object);
g_return_if_fail (linsyssdisrc != NULL);
/* clean up as possible. may be called multiple times */
g_free (linsyssdisrc->device);
linsyssdisrc->device = NULL;
G_OBJECT_CLASS (parent_class)->dispose (object);
}