Skip to content
Snippets Groups Projects
Commit f7828bc6 authored by Ludovico de Nittis's avatar Ludovico de Nittis :palm_tree:
Browse files

check-va-api.c: Fix config memory leak

parent cbb3634d
No related branches found
No related tags found
No related merge requests found
Pipeline #2986 passed
...@@ -105,7 +105,7 @@ main (int argc, ...@@ -105,7 +105,7 @@ main (int argc,
VASurfaceID *surfaces = NULL; VASurfaceID *surfaces = NULL;
VAImageFormat image_format; VAImageFormat image_format;
VAProfile *profiles = NULL; VAProfile *profiles = NULL;
VAConfigID config; VAConfigID config = VA_INVALID_ID;
VAContextID context = VA_INVALID_ID; VAContextID context = VA_INVALID_ID;
VABufferID misc_buf_id = VA_INVALID_ID; VABufferID misc_buf_id = VA_INVALID_ID;
VABufferID pipeline_param_buf_id = VA_INVALID_ID; VABufferID pipeline_param_buf_id = VA_INVALID_ID;
...@@ -283,6 +283,8 @@ out: ...@@ -283,6 +283,8 @@ out:
vaDestroyContext (va_display, context); vaDestroyContext (va_display, context);
if (img.image_id != VA_INVALID_ID) if (img.image_id != VA_INVALID_ID)
vaDestroyImage (va_display, img.image_id); vaDestroyImage (va_display, img.image_id);
if (config != VA_INVALID_ID)
vaDestroyConfig(va_display, config);
if (surfaces) if (surfaces)
vaDestroySurfaces (va_display, surfaces, surfaces_count); vaDestroySurfaces (va_display, surfaces, surfaces_count);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment