Skip to content

Memory leak #18085

@TheRealMal

Description

@TheRealMal

Bug report criteria

What happened?

file is being opened here

f, err = os.OpenFile(partpath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, fileutil.PrivateFileMode)

but being closed only here

if err = f.Close(); err != nil {

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

-

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions