Fixing a memleak

Original commit message from CVS:
Fixing a memleak
This commit is contained in:
Julien Moutte 2003-12-12 17:46:36 +00:00
parent db10d21391
commit 2eb7332b1b

View file

@ -398,6 +398,7 @@ gst_xvimagesink_get_xv_support (GstXContext *xcontext)
gint nb_formats;
XvImageFormatValues *formats = NULL;
GstCaps *caps = NULL;
char *caps_str;
/* We get all image formats supported by our port */
formats = XvListImageFormats (xcontext->disp,
@ -457,7 +458,13 @@ gst_xvimagesink_get_xv_support (GstXContext *xcontext)
if (formats)
XFree (formats);
GST_DEBUG ("Generated the following caps %s", gst_caps_to_string (caps));
caps_str = gst_caps_to_string (caps);
GST_DEBUG ("Generated the following caps %s", caps_str);
if (caps_str)
g_free (caps_str);
return caps;
}