etcd
etcd copied to clipboard
Memory leak
Bug report criteria
- [X] This bug report is not security related, security issues should be disclosed privately via etcd maintainers.
- [X] This is not a support request or question, support requests or questions should be raised in the etcd discussion forums.
- [X] You have read the etcd bug reporting guidelines.
- [X] Existing open issues along with etcd frequently asked questions have been checked and this is not a duplicate.
What happened?
file is being opened here https://github.com/etcd-io/etcd/blob/9914047acb5c679531f644d9c81718fcd85a3108/client/v3/snapshot/v3_snapshot.go#L63
but being closed only here https://github.com/etcd-io/etcd/blob/9914047acb5c679531f644d9c81718fcd85a3108/client/v3/snapshot/v3_snapshot.go#L87
Between these lines errors can be occured and file won't be closed
What did you expect to happen?
There should close function invocation via defer
How can we reproduce it (as minimally and precisely as possible)?
Check code
Anything else we need to know?
Etcd version (please run commands below)
latest
Etcd configuration (command line flags or environment variables)
Etcd debug information (please run commands below, feel free to obfuscate the IP address or FQDN in the output)
Relevant log output
-