Skip to content

Possible double fclose  #3834

@viennadd

Description

@viennadd

Hi,
reported two places might invoke twice of fclose, aof.c#L1211 and rdb.c#L1008
they are similar as followed:

    if (fclose(fp) == EOF) goto werr;
   ........
werr:
   .......
    fclose(fp);
   ........

while invoking twice of fclose is undefined behavior, you might want to take a look. (reference to the RETURN VALUE part of https://linux.die.net/man/3/fclose)

Regards,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions