Commit c2d0d864 authored by Jean-Paul Saman's avatar Jean-Paul Saman

src/xvba_video.c: xvba_CreateConfig() extra checking

Add extra checking.
parent 01b162ad
......@@ -391,6 +391,8 @@ xvba_CreateConfig(
return VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
configID = object_heap_allocate(&driver_data->config_heap);
if (configID == VA_INVALID_ID)
return VA_STATUS_ERROR_ALLOCATION_FAILED;
obj_config = XVBA_CONFIG(configID);
if (!obj_config)
return VA_STATUS_ERROR_ALLOCATION_FAILED;
......@@ -429,6 +431,7 @@ xvba_DestroyConfig(
return VA_STATUS_ERROR_INVALID_CONFIG;
object_heap_free(&driver_data->config_heap, (object_base_p)obj_config);
config_id = VA_INVALID_ID;
return VA_STATUS_SUCCESS;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment