ldap: use correct memory free function - #6671
Closed
danielgustafsson wants to merge 1 commit into
Closed
Conversation
jay
approved these changes
Feb 26, 2021
jay
left a comment
Member
There was a problem hiding this comment.
curlx_unicodefree uses (free) with parentheses so it is not overridden by the memory debugger free macro. in other words the curlx functions are not meant to be memory tracked, afaict
unescaped is coming from Curl_urldecode and not a unicode conversion function, so reclaiming its memory should be performed with a normal call to free rather than curlx_unicodefree. In reality, this is the same thing as curlx_unicodefree is implemented as a call to free but that's not guaranteed to always hold. Using the curlx macro present issues with memory debugging as well. Closes curl#6671 Reviewed-by: Jay Satiro <raysatiro@yahoo.com>
danielgustafsson
force-pushed
the
dg-ldap_free
branch
from
February 28, 2021 19:56
11b1fae to
afc0ab7
Compare
Member
Author
|
Found two more instances so pushed a small rebase with those for another just-in-case run through the CI farm before landing this is in master. |
bagder
approved these changes
Mar 1, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
unescapedis coming fromCurl_urldecodeand not a unicode conversion function, so reclaiming its memory should be performed with a normal call tofreerather thancurlx_unicodefree. In reality, this is the same thing ascurlx_unicodefreeis implemented as a call tofreebut that's not guaranteed to always hold (and is less readable in this case IMO).