From aad4298df0d31abe15ac40d0560b0bf196d6c1b5 Mon Sep 17 00:00:00 2001 From: Leung Lai Yung Date: Sat, 9 Apr 2022 10:45:12 +0000 Subject: gtpu: fix memory leak Type: fix Free the old rewrite string before assigning a new rewrite string for the updated new tteid value. Signed-off-by: Leung Lai Yung Change-Id: I1ec19bce6afda3dfdc31c8724b32ac7b9bc84e89 --- src/plugins/gtpu/gtpu.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/plugins/gtpu/gtpu.c') diff --git a/src/plugins/gtpu/gtpu.c b/src/plugins/gtpu/gtpu.c index 33af26d70ee..086a4b55f63 100644 --- a/src/plugins/gtpu/gtpu.c +++ b/src/plugins/gtpu/gtpu.c @@ -578,6 +578,7 @@ int vnet_gtpu_add_mod_del_tunnel if (a->tteid == 0) return VNET_API_ERROR_INVALID_VALUE; t->tteid = a->tteid; + vec_free (t->rewrite); ip_udp_gtpu_rewrite (t, is_ip6); return 0; } -- cgit 1.2.3-korg