Skip to content

Commit 14146d7

Browse files
authored
Merge pull request #80 from libxengine/autofix/high/alert-69
[Autofix][high] Alert #69: Incorrect allocation-error handling
2 parents 636a01d + e338305 commit 14146d7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

XEngine_Source/StorageModule_BTorrent/BTorrent_Parse/BTorrent_Parse.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 "BTorrent_Parse.h"
3+
#include <new>
34
/********************************************************************
45
// Created: 2023/02/02 16:26:41
56
// File Name: D:\XEngine\XEngine_SourceCode\XEngine_NetHelp\NetHelp_BTorrent\BTorrent_Parse\BTorrent_Parse.cpp
@@ -44,7 +45,7 @@ XHANDLE CBTorrent_Parse::BTorrent_Parse_Init(LPCXSTR lpszAddr)
4445
return NULL;
4546
}
4647
//申请空间
47-
BTORRENT_PARSEINFO* pSt_BTParse = new BTORRENT_PARSEINFO;
48+
BTORRENT_PARSEINFO* pSt_BTParse = new (std::nothrow) BTORRENT_PARSEINFO;
4849
if (NULL == pSt_BTParse)
4950
{
5051
BTDload_IsErrorOccur = true;

0 commit comments

Comments
 (0)