From 94dfe2856c29dd4503fba5a25feca92225b51e94 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 26 Aug 2013 10:53:00 +0200 Subject: [PATCH] core: fix leaking route instance in nm_ip4_config_update_setting The fix in commit b5b43a6d65496e3016ef16bf32590b4f1d04123d missed the release of the route instance (because nm_setting_ip4_config_add_route does not take over the passed route but duplicates it). So the orginal error was to free the route with the wrong deallocation method gs_unref_object instead of nm_ip4_route_unref. Signed-off-by: Thomas Haller --- src/nm-ip4-config.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nm-ip4-config.c b/src/nm-ip4-config.c index d32ec4276..9b9deeaf3 100644 --- a/src/nm-ip4-config.c +++ b/src/nm-ip4-config.c @@ -303,6 +303,7 @@ nm_ip4_config_update_setting (NMIP4Config *config, NMSettingIP4Config *setting) nm_ip4_route_set_metric (s_route, route->metric); nm_setting_ip4_config_add_route (setting, s_route); + nm_ip4_route_unref (s_route); } /* DNS */