-
Notifications
You must be signed in to change notification settings - Fork 592
Labels
Area: TestingRelated to test coverageRelated to test coverageTriagedThis item has been triaged by an MsQuic ownerThis item has been triaged by an MsQuic ownerhelp wantedExtra attention is neededExtra attention is needed
Milestone
Description
Description
if either of the following calls failed:
msquic/src/tools/ip/server/quicipserver.cpp
Lines 82 to 84 in 07a7c46
if (QUIC_FAILED(Status = MsQuic->StreamOpen(Connection, QUIC_STREAM_OPEN_FLAG_UNIDIRECTIONAL, ServerStreamCallback, nullptr, &Stream))) { | |
printf("StreamOpen failed, 0x%x!\n", Status); | |
return; |
msquic/src/tools/ip/server/quicipserver.cpp
Lines 87 to 91 in 07a7c46
if (QUIC_FAILED(Status = MsQuic->StreamStart(Stream, QUIC_STREAM_START_FLAG_NONE))) { | |
printf("StreamStart failed, 0x%x!\n", Status); | |
MsQuic->StreamClose(Stream); | |
return; | |
} |
The allocated SendBuffer would not be freed, leading to a memory leak.
Suggested fix
Add CXPLAT_FREE(SendBuffer, QUIC_POOL_TOOL);
in those paths. Ensure that for every CXPLAT_ALLOC
there is a corresponding CXPLAT_FREE
in all exit paths.
Copilot
Metadata
Metadata
Labels
Area: TestingRelated to test coverageRelated to test coverageTriagedThis item has been triaged by an MsQuic ownerThis item has been triaged by an MsQuic ownerhelp wantedExtra attention is neededExtra attention is needed