Skip to content

mv: fix memleak when safe_create_leading_directories alloc failed - #6

Open
GermanAizek wants to merge 2 commits into
Libre-WD-40:masterfrom
Lainports:fix-memleak-if-create-fail
Open

mv: fix memleak when safe_create_leading_directories alloc failed#6
GermanAizek wants to merge 2 commits into
Libre-WD-40:masterfrom
Lainports:fix-memleak-if-create-fail

Conversation

@GermanAizek

Copy link
Copy Markdown

@metux,
dst_dup variable, allocated with xstrdup(), is not always freed. If safe_create_leading_directories() fails, the allocated memory is leaked. Git codebase shows that it is recommended to always check result safe_create_leading_directories() function.

metux and others added 2 commits February 9, 2026 16:34
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
`dst_dup` variable, allocated with `xstrdup()`, is not always freed. If safe_create_leading_directories() fails, the allocated memory is leaked.
Git codebase shows that it is recommended to always check result safe_create_leading_directories() function.
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.

4 participants