Skip to content

Avoid leaking file descriptors in RegisterLoad#6488

Merged
laanwj merged 1 commit intobitcoin:masterfrom
casey:register-load-filehandle-leak
Jul 29, 2015
Merged

Avoid leaking file descriptors in RegisterLoad#6488
laanwj merged 1 commit intobitcoin:masterfrom
casey:register-load-filehandle-leak

Conversation

@casey
Copy link
Copy Markdown
Contributor

@casey casey commented Jul 28, 2015

This is pretty trivial, but if there's an error here we'll leak a file descriptor. Changed it to always close the file.

This is pretty trivial, but if there's an error here we'll leak a file
descriptor. Changed it to always close the file.
@TheBlueMatt
Copy link
Copy Markdown
Contributor

utACK

@laanwj
Copy link
Copy Markdown
Member

laanwj commented Jul 29, 2015

utACK. Looks good to me. Non-RAII C types are a continuing exception-safety hazard.

@jonasschnelli
Copy link
Copy Markdown
Contributor

Nice catch.
utACK.

@laanwj laanwj merged commit 17ac0f4 into bitcoin:master Jul 29, 2015
laanwj added a commit that referenced this pull request Jul 29, 2015
17ac0f4 Avoid leaking file descriptors in RegisterLoad (Casey Rodarmor)
@casey casey deleted the register-load-filehandle-leak branch July 29, 2015 17:02
@jgarzik
Copy link
Copy Markdown
Contributor

jgarzik commented Jul 29, 2015

posthumous ut ACK

@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants