Skip to content

Potential memory-leak #291

@HoshinoStranding

Description

@HoshinoStranding

Hi, I have found a potential memory-leak bug in the project and would like to report it to the maintainers. Can you please help me to check it? Thank you for your effort and patience!

In function rommon_var_set in file common/rommon_var.c, new_value is assigned with newly allocated memory at line 110 and then stored into var->value at line 117, where var is the first param of the function. But in function rommon_var_add (also in file common/rommon_var.c) , var is local and used as the 1st param of the call for rommon_var_set at line 139, where var->value is not freed and a memory-leak bug may occur.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions