dhcp: don't leak dhclient config file contents when merging

If there was an existing dhclient config file, don't leak it when
merging to the new configuration.

Found by Mathieu Trudel-Lapierre <mathieu@canonical.com>
This commit is contained in:
Dan Williams 2012-05-23 12:58:05 -05:00
parent 0a85eefd8c
commit 228224a072

View file

@ -334,6 +334,7 @@ merge_dhclient_config (const char *iface,
g_assert (new);
success = g_file_set_contents (conf_file, new, -1, error);
g_free (new);
g_free (orig);
return success;
}