-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Free returned memory of SCDynamicStoreCopyProxies #7265
Free returned memory of SCDynamicStoreCopyProxies #7265
Conversation
From Apples documentation on SCDynamicStoreCopyProxies, "Return Value: A dictionary of key-value pairs that represent the current internet proxy settings, or NULL if no proxy settings have been defined or if an error occurred. You must release the returned value." Failure to release the returned value of SCDynamicStoreCopyProxies can result in a memory leak. Source: https://developer.apple.com/documentation/systemconfiguration/1517088-scdynamicstorecopyproxies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to match the mentioned document!
It seems this breaks the cmake builds?
|
Looks as though I will need to link in CoreFoundation |
…eg-Muchka/curl into memory_leak_SCDynamicStoreCopyProxies
Thanks! |
Sorry to re-open this task, but are there any plans for a curl 7.77.1 release with this bug fixed in the near future? Thank you |
@tawmoto The next release is in less than 2 weeks (21st of July), so I don't think so. |
From Apples documentation on SCDynamicStoreCopyProxies,
"Return Value: A dictionary of key-value pairs that represent the current internet proxy settings, or NULL if no proxy settings have been defined or if an error occurred. You must release the returned value."
The use of SCDynamicStoreCopyProxies without releasing the returned memory has resulted in a memory leak in curl 7.77.0.
Source: https://developer.apple.com/documentation/systemconfiguration/1517088-scdynamicstorecopyproxies