Skip to content

Comments

Fix memory leak in ServerSendIp error paths#5802

Open
MarkedMuichiro wants to merge 1 commit intomicrosoft:mainfrom
MarkedMuichiro:fix-5255-free-sendbuffer
Open

Fix memory leak in ServerSendIp error paths#5802
MarkedMuichiro wants to merge 1 commit intomicrosoft:mainfrom
MarkedMuichiro:fix-5255-free-sendbuffer

Conversation

@MarkedMuichiro
Copy link

Description

Fixes #5255.

Adds missing CXPLAT_FREE(SendBufferRaw, QUIC_POOL_TOOL) calls in early
error-return paths in ServerSendIp() to prevent a potential memory leak
when StreamOpen or StreamStart fails.

This change only affects test tooling code in:
src/tools/ip/server/quicipserver.cpp

Testing

No new tests added.

The affected code is part of test tooling, and the failure paths
require StreamOpen or StreamStart to fail, which would require
fault injection or specific runtime conditions to exercise reliably.

Built successfully locally on Linux (GitHub Codespaces).

Documentation

None.

@MarkedMuichiro MarkedMuichiro requested a review from a team as a code owner February 21, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Potential Memory Leak Due to Missing CXPLAT_FREE() in Error Paths

1 participant