Use curl_getenv in Curl_qlogdir#18170
Closed
dvdzhuang wants to merge 3 commits into
Closed
Conversation
Member
|
Would you mind posting more details about your environment/toolchain |
Contributor
Author
|
Sure; this is a follow-up on this change: d31a842 Sony has its own version of clang and ld, and the PlayStation SDK derives from FreeBSD but with quirks. I'm building curl 8.14.1 with nghttp3 1.10.9, ngtcp2 1.12.90, and OpenSSL 3.5.0. This is the output: |
bagder
reviewed
Aug 5, 2025
| int *qlogfdp) | ||
| { | ||
| const char *qlog_dir = getenv("QLOGDIR"); | ||
| const char *qlog_dir = curl_getenv("QLOGDIR"); |
Member
There was a problem hiding this comment.
curl_getenv() returns an allocated string, so with just replacement this seems to introduce a memory leak?
Contributor
Author
There was a problem hiding this comment.
Ah sorry; I hadn't realized. Changed to make qlog_dir not const and freed at the end 👍
bagder
approved these changes
Aug 5, 2025
Member
|
Thanks! |
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.
getenvisn't defined on all platforms, which prevents vquic from building. I specifically ran into this issue building on PlayStation.