GNS3/dynamips

A potential bug of memory leak(3)

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-0.2.14/common/device.c , function dev_create line 101 :
Allocate memory to dev

step 2 :
In file dynamips-0.2.14/common/device.c , function dev_create line 101 :
Select the fasle branch at this point (dev==null is false)

step 3 :
In file dynamips-0.2.14/common/dev_wic_serial.c , function dev_wic_serial_init line 147 :
Function dev_create executes and stores the return value to dev, the allocated memory is leaked because absense of free-statement.