Skip to content

Resolve strdup memory leak with GetPathBaseName#1106

Open
SmoothHacker wants to merge 1 commit into
Vector35:devfrom
SmoothHacker:resolve-basename-memory-leak
Open

Resolve strdup memory leak with GetPathBaseName#1106
SmoothHacker wants to merge 1 commit into
Vector35:devfrom
SmoothHacker:resolve-basename-memory-leak

Conversation

@SmoothHacker

Copy link
Copy Markdown

Whenever DebugModule::GetPathBaseName and ModuleNameAndOffset::GetPathBaseName is called a memory leak the size of the c string version of the path parameter is created because of strdup(). The fix involves using std::filesystem. We create a std::filesystem::path object and then return the steam of that path.

…Name and ModuleNameAndOffset::GetPathBaseName
@CLAassistant

CLAassistant commented Jun 28, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

2 participants