diff options
author | Jimmy Ohn <yongjin.ohn@lge.com> | 2017-06-29 08:30:50 +0900 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2017-06-29 15:26:36 +0100 |
commit | a8acba142f95815d93112294e7d2110553aeb62e (patch) | |
tree | 2ec802c4e3c830412bc75e73fe276b18917c6d69 /tools | |
parent | a405aedde83316ced6d173a678c25ba61c89b303 (diff) |
gst-inspect: Fix memory leak in print_pad_templates_info
gst_static_caps_get function returned allocated memory.
So, It should be free using gst_caps_unref.
https://bugzilla.gnome.org/show_bug.cgi?id=784311
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gst-inspect.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c index e420e4cd72..c885aba4a7 100644 --- a/tools/gst-inspect.c +++ b/tools/gst-inspect.c @@ -572,8 +572,11 @@ print_pad_templates_info (GstElement * element, GstElementFactory * factory) n_print (" Availability: UNKNOWN!!!\n"); if (padtemplate->static_caps.string) { + GstCaps *caps = gst_static_caps_get (&padtemplate->static_caps); + n_print (" Capabilities:\n"); - print_caps (gst_static_caps_get (&padtemplate->static_caps), " "); + print_caps (caps, " "); + gst_caps_unref (caps); } n_print ("\n"); |