Skip to content

libssh: avoid plain free() of libssh-memory#6481

Closed
bagder wants to merge 1 commit into
masterfrom
bagder/libssh-free
Closed

libssh: avoid plain free() of libssh-memory#6481
bagder wants to merge 1 commit into
masterfrom
bagder/libssh-free

Conversation

@bagder

@bagder bagder commented Jan 18, 2021

Copy link
Copy Markdown
Member

Since curl's own memory debugging system redefines free() calls to track
and fiddle with memory, it cannot be used on memory allocated by 3rd
party libraries.

Third party libraries SHOULD NOT require free() to release allocated
resources for this reason - and libs can use separate healp allocators
on some systems (like Windows) so free() doesn't necessarily work
anyway.

Filed as an issue with libssh: https://bugs.libssh.org/T268

Since curl's own memory debugging system redefines free() calls to track
and fiddle with memory, it cannot be used on memory allocated by 3rd
party libraries.

Third party libraries SHOULD NOT require free() to release allocated
resources for this reason - and libs can use separate healp allocators
on some systems (like Windows) so free() doesn't necessarily work
anyway.

Filed as an issue with libssh: https://bugs.libssh.org/T268
@bagder bagder closed this in a3efced Jan 18, 2021
@bagder bagder deleted the bagder/libssh-free branch January 18, 2021 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants