mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
mediafoundation: MFTRegisterWorkQueue/MFTUnregisterWorkQueue to validate null param instead of crash
Reviewed-by: Pohsiang (John) Hsu <pohhsu@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40860>
This commit is contained in:
parent
6d1b209d0c
commit
4cac78bb3c
1 changed files with 4 additions and 2 deletions
|
|
@ -290,7 +290,8 @@ MFTRegisterWorkQueue( struct d3d12_context_queue_priority_manager *manager, ID3D
|
|||
mtx_lock( &mft_mgr->m_lock );
|
||||
|
||||
ComPtr<IUnknown> queue_unknown;
|
||||
if( FAILED( queue->QueryInterface( IID_PPV_ARGS( &queue_unknown ) ) ) )
|
||||
if( !queue ||
|
||||
FAILED( queue->QueryInterface( IID_PPV_ARGS( &queue_unknown ) ) ) )
|
||||
{
|
||||
mtx_unlock( &mft_mgr->m_lock );
|
||||
return -1;
|
||||
|
|
@ -318,7 +319,8 @@ MFTUnregisterWorkQueue( struct d3d12_context_queue_priority_manager *manager, ID
|
|||
mtx_lock( &mft_mgr->m_lock );
|
||||
|
||||
ComPtr<IUnknown> queue_unknown;
|
||||
if( FAILED( queue->QueryInterface( IID_PPV_ARGS( &queue_unknown ) ) ) )
|
||||
if( !queue ||
|
||||
FAILED( queue->QueryInterface( IID_PPV_ARGS( &queue_unknown ) ) ) )
|
||||
{
|
||||
mtx_unlock( &mft_mgr->m_lock );
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue