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

cookies: fix leak when writing cookies to file #2957

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@danielgustafsson
Member

danielgustafsson commented Sep 8, 2018

If the formatting fails, we error out on a fatal error and clean up on the way out. The array was however freed within the wrong scope and was thus never freed in case the cookies were written to a file instead of STDOUT.

cookies: fix leak when writing cookies to file
If the formatting fails, we error out on a fatal error and
clean up on the way out. The array was however freed within
the wrong scope and was thus never freed in case the cookies
were written to a file instead of STDOUT.
@bagder

bagder approved these changes Sep 8, 2018

@bagder

This comment has been minimized.

Member

bagder commented Sep 10, 2018

thanks!

@bagder bagder closed this in 6e05462 Sep 10, 2018

falconindy added a commit to falconindy/curl that referenced this pull request Sep 10, 2018

cookies: fix leak when writing cookies to file
If the formatting fails, we error out on a fatal error and
clean up on the way out. The array was however freed within
the wrong scope and was thus never freed in case the cookies
were written to a file instead of STDOUT.

Closes curl#2957
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment