Skip to content

missing GF_FREE for args->errstr, which is generated by gf_strdup in gd_collate_errors/gd_mgmt_v3_collate_errors #4637

@chen1195585098

Description

@chen1195585098

The memory allocated for args->errstr via gf_strdup must be explicitly freed before the function returns or at the appropriate cleanup point.

Meanwhile, I got the following error during compilation with the latest code:

    ec-inode-read.c: In function 'ec_manager_readv':
    ec-inode-read.c:1375:13: error: a label can only be part of a statement and a declaration is not a statement
                 uintptr_t inode_read_mask = ec_inode_readmask_get(fop->fd->inode,
                 ^~~~~~~~~
    make[5]: *** [Makefile:650: ec-inode-read.lo] Error 1

It occurs because inode_read_mask is declared in case-label.

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