core: fix leaking route instance in nm_ip4_config_update_setting
The fix in commit b5b43a6d65
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 <thaller@redhat.com>
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user