aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/memif/memif.c
diff options
context:
space:
mode:
authorSteven Luong <sluong@cisco.com>2022-01-31 13:30:37 -0800
committerDamjan Marion <dmarion@me.com>2022-02-07 19:04:18 +0000
commit261a059b3d03b00e85cf91bd75158f9b6772762e (patch)
treebd619ff5fd8527c1f6ef96a4d4668e27848fe106 /src/plugins/memif/memif.c
parenta47203128ba6a9d840280377a8dd3a72888c3708 (diff)
memif: memory leak when deleting memif interface
When deleting a memif interface, there is a memory leak in mif->local_disc_string. The code that leads to memory leak is memif_delete_if -> memif_disconect -> vec_dup Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I579c743c3d47770131153e083e65f6cd899067b3
Diffstat (limited to 'src/plugins/memif/memif.c')
-rw-r--r--src/plugins/memif/memif.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/memif/memif.c b/src/plugins/memif/memif.c
index 5da73621536..f2575fde787 100644
--- a/src/plugins/memif/memif.c
+++ b/src/plugins/memif/memif.c
@@ -873,6 +873,7 @@ memif_delete_if (vlib_main_t * vm, memif_if_t * mif)
}
}
+ vec_free (mif->local_disc_string);
clib_memset (mif, 0, sizeof (*mif));
pool_put (mm->interfaces, mif);