diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2017-10-10 09:52:39 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2017-10-10 09:52:39 +0200 |
commit | 31ad3dbc966ccbad7e26079561f13a587b44ebae (patch) | |
tree | acbaf677602c55129c89ddaacba1934ced25b2a6 /src/nm-ip6-config.c | |
parent | e037c66b6a14d4465cd0f2219bfe5320e72ef743 (diff) | |
download | NetworkManager-31ad3dbc966ccbad7e26079561f13a587b44ebae.tar.gz |
core: fix memory leaks in NMIP{4,6}Config
Fixes: 03e1cc96a5dc3d9a9b86f60810a330332c484a94
Fixes: 9a3117f1d3095e58859efce57ea4fb41d8fb7696
Diffstat (limited to 'src/nm-ip6-config.c')
-rw-r--r-- | src/nm-ip6-config.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nm-ip6-config.c b/src/nm-ip6-config.c index 81b443c67e..8eeabca223 100644 --- a/src/nm-ip6-config.c +++ b/src/nm-ip6-config.c @@ -460,7 +460,6 @@ nm_ip6_config_add_dependent_routes (NMIP6Config *self, * For manually added IPv6 routes, add the device routes explicitly. */ nm_ip_config_iter_ip6_address_for_each (&iter, self, &my_addr) { - NMPObject *r; NMPlatformIP6Route *route; gboolean has_peer; int routes_n, routes_i; @@ -477,6 +476,7 @@ nm_ip6_config_add_dependent_routes (NMIP6Config *self, ? 2 : 1; for (routes_i = 0; routes_i < routes_n; routes_i++) { + nm_auto_nmpobj NMPObject *r = NULL; r = nmp_object_new (NMP_OBJECT_TYPE_IP6_ROUTE, NULL); route = NMP_OBJECT_CAST_IP6_ROUTE (r); @@ -503,7 +503,6 @@ nm_ip6_config_add_dependent_routes (NMIP6Config *self, r, NM_PLATFORM_IP_ROUTE_CMP_TYPE_ID)) { /* we already track this route. Don't add it again. */ - nmp_object_unref (r); } else _add_route (self, r, NULL, NULL); } |