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.

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_setin filecommon/rommon_var.c,new_valueis assigned with newly allocated memory at line 110 and then stored intovar->valueat line 117, wherevaris the first param of the function. But in functionrommon_var_add(also in filecommon/rommon_var.c) ,varis local and used as the 1st param of the call forrommon_var_setat line 139, wherevar->valueis not freed and a memory-leak bug may occur.