diff options
author | Jimmy Ohn <yongjin.ohn@lge.com> | 2016-10-06 16:24:05 +0900 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-10-06 13:27:42 +0300 |
commit | fdefa9c1ad5ba9c42e86e059682c3a4fb071b351 (patch) | |
tree | 025f61ab5c7802154ea3b4e61ef222d7f908023f | |
parent | 9599c3416ca907a4201765230aa0786fd8fb861a (diff) | |
download | gstreamer-plugins-base-fdefa9c1ad5ba9c42e86e059682c3a4fb071b351.tar.gz |
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
-rw-r--r-- | tests/check/elements/videorate.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/check/elements/videorate.c b/tests/check/elements/videorate.c index 5f1140dc2..f0ce42875 100644 --- a/tests/check/elements/videorate.c +++ b/tests/check/elements/videorate.c @@ -978,6 +978,8 @@ static void check_caps_identical (GstCaps * a, GstCaps * b, const char *name) { int i; + gchar *caps_str_a; + gchar *caps_str_b; if (gst_caps_get_size (a) != gst_caps_get_size (b)) goto fail; @@ -995,8 +997,12 @@ check_caps_identical (GstCaps * a, GstCaps * b, const char *name) return; 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)", - 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 |