From: Cheoleun Moon Date: Thu, 13 Feb 2020 04:38:58 +0000 (+0900) Subject: Assign NULL after free X-Git-Tag: submit/tizen/20200214.070503^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_6.0_unified;p=platform%2Fcore%2Fapi%2Fvpn-setting.git Assign NULL after free Change-Id: I51d2ba6fcb73f3a6a8e15a3eb85b610a46316fc9 Signed-off-by: Cheoleun Moon --- diff --git a/dvpnlib/src/dvpnlib-vpn-connnection.c b/dvpnlib/src/dvpnlib-vpn-connnection.c index ea364fa..3473a89 100755 --- a/dvpnlib/src/dvpnlib-vpn-connnection.c +++ b/dvpnlib/src/dvpnlib-vpn-connnection.c @@ -264,9 +264,11 @@ static void parse_connection_property_user_routes( if (connection->user_routes == NULL) { ERROR("connection->server_routes is NULL"); return; - } else + } else { g_slist_free_full(connection->user_routes, free_vpn_connection_route); + connection->user_routes = NULL; + } while (g_variant_iter_loop(&outer, "(a{sv})", &route_entry)) { gchar *key; @@ -334,9 +336,11 @@ static void parse_connection_property_server_routes( if (connection->server_routes == NULL) { ERROR("connection->server_routes is NULL"); return; - } else + } else { g_slist_free_full(connection->server_routes, free_vpn_connection_route); + connection->server_routes = NULL; + } while (g_variant_iter_loop(&outer, "(a{sv})", &route_entry)) { gchar *key;