GNS3/dynamips

A potential bug of memory leak(1)

ash1852 opened this issue · 0 comments

hello,I found a potentil bug of memory leak in source code of dynamips , would you help me check whether this bug is ture?thank you for your effort and patience very much.

step 1 :
In file dynamips/common/rommon_var.c , function rommon_var_create line 78 :
Allocate memory to var

step 2 :
In file dynamips/common/rommon_var.c , function rommon_var_create line 78 :
Select the true branch at this point (var!=null is true)

step 3 :
In file dynamips/common/rommon_var.c , function rommon_var_create line 85 :
Select the false branch at this point (var->name==null is false)

step 4 :
In file dynamips/common/rommon_var.c , function rommon_var_add line 116 :
Function rommon_var_create executes and stores the return value to var

step 5 :
In file dynamips/common/rommon_var.c , function rommon_var_add line 117 :
Select the fasle branch at this point (var==null is false)

step 6 :
In file dynamips/common/rommon_var.c , function rommon_var_add line 119 :
Select the true branch at this point (rommon_var_set(var,value)==(-1) is true), the allocated memory is leaked