diff options
author | Leung Lai Yung <benkerbuild@gmail.com> | 2022-04-09 10:45:12 +0000 |
---|---|---|
committer | Matthew Smith <mgsmith@netgate.com> | 2022-04-14 17:56:09 +0000 |
commit | aad4298df0d31abe15ac40d0560b0bf196d6c1b5 (patch) | |
tree | 3a25d641559070257eed45ba02f79c7510819ef7 /src/plugins/gtpu/gtpu.c | |
parent | b909dfc27e612e2c8dfab6a11f3a0c6f09cde61a (diff) |
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 <benkerbuild@gmail.com>
Change-Id: I1ec19bce6afda3dfdc31c8724b32ac7b9bc84e89
Diffstat (limited to 'src/plugins/gtpu/gtpu.c')
-rw-r--r-- | src/plugins/gtpu/gtpu.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |