Hi Andrew, >>> + l_strfreev(netconfig->dns4_overrides); >> >> ? shouldn't this be taken care of by netconfig_reset? > > I thought we might have a future use case for calling > netconfig_load_settings() multiple times without netconfig_reset > between, but no strong motivation for that. > Can you elaborate on why we would want that? But even more reason not to side-effect. >> We generally don't like >> side-effects in our APIs. > > I wouldn't call avoiding a leak a side effect ;) > My point is, you shouldn't be setting anything inside netconfig until you know the operation will succeed completely. Doing otherwise makes error handling a nightmare. netconfig_configure would never fail since it would ignore invalid input. In fact, I'm not sure why it had a bool return in the first place. In this patch you're changing the contract such that netconfig_load_settings checks up-front if the networking settings are correct or not. Side-effecting is not desirable in this case. Regards, -Denis