We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27a54a1 commit 01c7f3cCopy full SHA for 01c7f3c
src/perf/lib/PerfServer.cpp
@@ -106,8 +106,17 @@ PerfServer::Init(
106
107
ProcCount = (uint16_t)CxPlatProcCount();
108
DelayWorkers = new (std::nothrow) DelayWorker[ProcCount];
109
+ if (!DelayWorkers) {
110
+ WriteOutput("Failed to allocate delay workers.\n");
111
+ return QUIC_STATUS_OUT_OF_MEMORY;
112
+ }
113
for (uint16_t i = 0; i < ProcCount; ++i) {
114
if (!DelayWorkers[i].Initialize(this, i)) {
115
+ for (uint16_t j = 0; j < i; ++j) {
116
+ DelayWorkers[j].Shutdown();
117
118
+ delete[] DelayWorkers;
119
+ DelayWorkers = nullptr;
120
WriteOutput("Failed to init delay workers.\n");
121
return QUIC_STATUS_INTERNAL_ERROR;
122
}
0 commit comments