From 7e5e845e5fd4665b1a75985b198f727872937efb Mon Sep 17 00:00:00 2001 From: Nishant Chaprana Date: Mon, 20 Sep 2021 12:56:32 +0530 Subject: [PATCH] Fix: Memory leak issue when tokenizing string Change-Id: I71e88bb35384cf919263fa5dda8c4f0f06be6ef2 Signed-off-by: Nishant Chaprana --- vpn/plugins/wireguard.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vpn/plugins/wireguard.c b/vpn/plugins/wireguard.c index 25ec32d..e7ffbd1 100644 --- a/vpn/plugins/wireguard.c +++ b/vpn/plugins/wireguard.c @@ -171,6 +171,9 @@ static int parse_allowed_ips(const char *allowed_ips, wg_peer *peer) curaip->next_allowedip = allowedip; curaip = allowedip; +#if defined TIZEN_EXT + g_strfreev(toks); +#endif } peer->last_allowedip = curaip; -- 2.7.4