Skip to content

Commit cd512c1

Browse files
Potential fix for code scanning alert no. 44: Incorrect allocation-error handling
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 492f02d commit cd512c1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

XEngine_Module/XEngine_AIApi/AIApi_Vision/AIApi_Vision.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ bool CAIApi_Vision::AIApi_Vision_Create(XNETHANDLE* pxhToken, LPCXSTR lpszAPIUrl
6363
AIApi_dwErrorCode = ERROR_XENGINE_MODULE_AIAPI_VISION_PARAMENT;
6464
return false;
6565
}
66-
AICLIENT_VISION *pSt_AIClient = new AICLIENT_VISION;
66+
AICLIENT_VISION *pSt_AIClient = new(std::nothrow) AICLIENT_VISION;
6767
if (NULL == pSt_AIClient)
6868
{
6969
AIApi_IsErrorOccur = true;

0 commit comments

Comments
 (0)