Skip to content

Commit bccd917

Browse files
authored
Merge pull request #39 from libxengine/autofix/high/alert-39
[Autofix][high] Alert #39: Incorrect allocation-error handling
2 parents 803e020 + 9480cbd commit bccd917

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

XEngine_Source/XEngine_ModuleSession/ModuleSession_PullStream/ModuleSession_PullStream.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "pch.h"
22
#include "ModuleSession_PullStream.h"
3+
#include <new>
34
/********************************************************************
45
// Created: 2023/06/05 16:11:53
56
// File Name: D:\XEngine_StreamMedia\XEngine_Source\XEngine_ModuleSession\ModuleSession_PullStream\ModuleSession_PullStream.cpp
@@ -52,7 +53,7 @@ bool CModuleSession_PullStream::ModuleSession_PullStream_Insert(LPCXSTR lpszClie
5253
{
5354
Session_IsErrorOccur = false;
5455

55-
STREAMMEDIA_PULLLISTINFO* pSt_PullStream = new STREAMMEDIA_PULLLISTINFO;
56+
STREAMMEDIA_PULLLISTINFO* pSt_PullStream = new(std::nothrow) STREAMMEDIA_PULLLISTINFO;
5657
if (NULL == pSt_PullStream)
5758
{
5859
Session_IsErrorOccur = true;

0 commit comments

Comments
 (0)