mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
va: utils: free allocated string
and fix a memleak Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1516>
This commit is contained in:
parent
69a00541dd
commit
80de32b017
1 changed files with 4 additions and 1 deletions
|
@ -294,10 +294,13 @@ gst_context_get_va_display (GstContext * context, const gchar * type_name,
|
||||||
s = gst_context_get_structure (context);
|
s = gst_context_get_structure (context);
|
||||||
if (gst_structure_get (s, "gst-display", GST_TYPE_VA_DISPLAY, &display, NULL)) {
|
if (gst_structure_get (s, "gst-display", GST_TYPE_VA_DISPLAY, &display, NULL)) {
|
||||||
gchar *device_path = NULL;
|
gchar *device_path = NULL;
|
||||||
|
gboolean ret;
|
||||||
|
|
||||||
if (GST_IS_VA_DISPLAY_DRM (display)) {
|
if (GST_IS_VA_DISPLAY_DRM (display)) {
|
||||||
g_object_get (display, "path", &device_path, NULL);
|
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;
|
goto accept;
|
||||||
} else if (!is_devnode) {
|
} else if (!is_devnode) {
|
||||||
goto accept;
|
goto accept;
|
||||||
|
|
Loading…
Reference in a new issue