Skip to content
This repository was archived by the owner on Jan 14, 2026. It is now read-only.
This repository was archived by the owner on Jan 14, 2026. It is now read-only.

COVERITY RESOURCE_LEAK - Missing parse_arg_eq_done() before return #48

@shao-liancheng

Description

@shao-liancheng

'parse_arg_eq_done(&pt)' should be called to free memory before function return. Please go over all the 'return' in this function.

There are multiple instance return the function without calling parse_arg_eq_done().

The right behavior should be 3 steps
test_error("xxxxxx", ...); // print proper error information.
rv = xx; // set proper error value
goto done; // go to the function end to release memory.

for example:

rv = soc_mem_clear(unit, EXT_ACL432_TCAM_MASKm,
MEM_BLOCK_ALL, TRUE);
if (rv < 0) {
test_error(unit, "Could not clear EXT_ACL432_TCAM_MASK\n");
goto done;

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