mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 10:10:32 +00:00
videorate: Fix memory leakage in test code
gst_caps_to_string function returned allocated memory. So, It should be free using g_free function. https://bugzilla.gnome.org/show_bug.cgi?id=772501
This commit is contained in:
parent
9599c3416c
commit
fdefa9c1ad
1 changed files with 7 additions and 1 deletions
|
@ -978,6 +978,8 @@ static void
|
||||||
check_caps_identical (GstCaps * a, GstCaps * b, const char *name)
|
check_caps_identical (GstCaps * a, GstCaps * b, const char *name)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
gchar *caps_str_a;
|
||||||
|
gchar *caps_str_b;
|
||||||
|
|
||||||
if (gst_caps_get_size (a) != gst_caps_get_size (b))
|
if (gst_caps_get_size (a) != gst_caps_get_size (b))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
@ -995,8 +997,12 @@ check_caps_identical (GstCaps * a, GstCaps * b, const char *name)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
|
caps_str_a = gst_caps_to_string (a);
|
||||||
|
caps_str_b = gst_caps_to_string (b);
|
||||||
fail ("%s caps (%s) is not equal to caps (%s)",
|
fail ("%s caps (%s) is not equal to caps (%s)",
|
||||||
name, gst_caps_to_string (a), gst_caps_to_string (b));
|
name, caps_str_a, caps_str_b);
|
||||||
|
g_free (caps_str_a);
|
||||||
|
g_free (caps_str_b);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue