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

Conversation

Projects
None yet
3 participants
@kdudka
Collaborator

kdudka commented Oct 15, 2018

Detected by Coverity.

@jay

This comment has been minimized.

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.

tool_cb_hdr: handle failure of rename()
Detected by Coverity.

Closes #3140
Reviewed-by: Jay Satiro
@kdudka

This comment has been minimized.

Collaborator

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

continuous-integration/travis-ci/push The Travis CI build is in progress
Details
LGTM analysis: C/C++ No alert changes
Details
LGTM analysis: Python No code changes detected
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.09%) to 73.522%
Details

@kdudka kdudka deleted the kdudka:rename-failure branch Oct 17, 2018

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