Skip to content

Un-needed check for null pointer before free #274

@amgross

Description

@amgross

At least twice I see checking of null pointer before free it:

if ({$info.freeName})
{
erpc_free({$info.freeName});
}

if ({$info.name})
{
erpc_free({$info.name});
}

Can't we assume that erpc_free know to handle properly null pointer like the c standard library free function?

It is not bug, just extra code and run-time.

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