test_vnswif - intf_delete test references freed memory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenContrail |
New
|
Undecided
|
Unassigned |
Bug Description
Let's have a look into the following code from controller\
01: // Validate that link-local address is deleted when interface is deleted
02: TEST_F(TestVnswIf, intf_delete) {
03: DeleteVmportEnv
04: client-
05: EXPECT_
06: EXPECT_
07: }
Statement from line 3 schedules deletion of object pointed by vnet1_. Once statement from line 4 is completed, the object has already been deleted. However, it is referenced in line 5. It means that freed memory is accessed. It may be unnoticed if that memory is still available to the process and there is still meaningful value, but this behavior is incorrect.