Skip to content
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

tool_cb_hdr: handle failure of rename() #3140

Merged
merged 1 commit into from Oct 17, 2018
Merged

Conversation

kdudka
Copy link
Collaborator

@kdudka kdudka commented Oct 15, 2018

Detected by Coverity.

@jay
Copy link
Member

jay commented Oct 16, 2018

In the case of failure outs->filename is freed but then never reassigned to so couldn't that lead to a double free, I suggest change it to Curl_safefree instead. Also braces for the if warnf since it spans more than one line.

Detected by Coverity.

Closes curl#3140
Reviewed-by: Jay Satiro
@kdudka
Copy link
Collaborator Author

kdudka commented Oct 17, 2018

@jay Thanks for review! PR updated...

bagder
bagder approved these changes Oct 17, 2018
@kdudka kdudka merged commit 6b6ba1d into curl:master Oct 17, 2018
5 of 6 checks passed
@kdudka kdudka deleted the rename-failure branch Oct 17, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants