From 78e33b59e99f95325de9dc524b7fe22494733909 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Wed, 3 Nov 2004 16:08:14 +0000 Subject: [PATCH] gst/videoscale/: leak fixes Original commit message from CVS: 2004-11-03 Christophe Fergeau * gst/videoscale/gstvideoscale.c: (gst_videoscale_getcaps): * gst/videoscale/videoscale.c: (videoscale_find_by_structure): leak fixes --- ChangeLog | 6 ++++++ gst/videoscale/gstvideoscale.c | 6 ++---- gst/videoscale/videoscale.c | 5 ++++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0459ad1184..6553f4e7b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-11-03 Christophe Fergeau + + * gst/videoscale/gstvideoscale.c: (gst_videoscale_getcaps): + * gst/videoscale/videoscale.c: (videoscale_find_by_structure): + leak fixes + 2004-11-03 Wim Taymans * gst/ffmpegcolorspace/gstffmpegcodecmap.c: diff --git a/gst/videoscale/gstvideoscale.c b/gst/videoscale/gstvideoscale.c index 403711d34d..febb5cca5b 100644 --- a/gst/videoscale/gstvideoscale.c +++ b/gst/videoscale/gstvideoscale.c @@ -177,7 +177,6 @@ static GstCaps * gst_videoscale_getcaps (GstPad * pad) { GstVideoscale *videoscale; - GstCaps *othercaps; GstCaps *caps; GstPad *otherpad; int i; @@ -186,12 +185,11 @@ gst_videoscale_getcaps (GstPad * pad) otherpad = (pad == videoscale->srcpad) ? videoscale->sinkpad : videoscale->srcpad; - othercaps = gst_pad_get_allowed_caps (otherpad); + caps = gst_pad_get_allowed_caps (otherpad); GST_DEBUG_OBJECT (pad, "othercaps of otherpad %s:%s are: %" GST_PTR_FORMAT, - GST_DEBUG_PAD_NAME (otherpad), othercaps); + GST_DEBUG_PAD_NAME (otherpad), caps); - caps = gst_caps_copy (othercaps); for (i = 0; i < gst_caps_get_size (caps); i++) { GstStructure *structure = gst_caps_get_structure (caps, i); diff --git a/gst/videoscale/videoscale.c b/gst/videoscale/videoscale.c index f85e463986..7e6decf20c 100644 --- a/gst/videoscale/videoscale.c +++ b/gst/videoscale/videoscale.c @@ -164,8 +164,11 @@ videoscale_find_by_structure (GstStructure * structure) int i; gboolean ret; struct videoscale_format_struct *format; + char *str; - GST_DEBUG ("finding %s", gst_structure_to_string (structure)); + str = gst_structure_to_string (structure); + GST_DEBUG ("finding %s", str); + g_free (str); g_return_val_if_fail (structure != NULL, NULL);