diff options
author | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2020-08-19 17:18:26 +0200 |
---|---|---|
committer | GStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2020-08-24 19:35:57 +0000 |
commit | 80de32b017d8eb4110f3a1695385353a7105066e (patch) | |
tree | 61a8136e601a9d487e7d02b177e80807927eea85 | |
parent | 69a00541ddc67b06ae6da434498c2854d99b0b95 (diff) | |
download | gstreamer-plugins-bad-80de32b017d8eb4110f3a1695385353a7105066e.tar.gz |
va: utils: free allocated string
and fix a memleak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1516>
-rw-r--r-- | sys/va/gstvautils.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/va/gstvautils.c b/sys/va/gstvautils.c index 24d5d08c9..95bfaee44 100644 --- a/sys/va/gstvautils.c +++ b/sys/va/gstvautils.c @@ -294,10 +294,13 @@ gst_context_get_va_display (GstContext * context, const gchar * type_name, s = gst_context_get_structure (context); if (gst_structure_get (s, "gst-display", GST_TYPE_VA_DISPLAY, &display, NULL)) { gchar *device_path = NULL; + gboolean ret; if (GST_IS_VA_DISPLAY_DRM (display)) { g_object_get (display, "path", &device_path, NULL); - if (g_strcmp0 (device_path, render_device_path) == 0) + ret = (g_strcmp0 (device_path, render_device_path) == 0); + g_free (device_path); + if (ret) goto accept; } else if (!is_devnode) { goto accept; |