From 228224a072bb78ae7e84de3139c4194b3fec1e1f Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 23 May 2012 12:58:05 -0500 Subject: [PATCH] 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 --- src/dhcp-manager/nm-dhcp-dhclient.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dhcp-manager/nm-dhcp-dhclient.c b/src/dhcp-manager/nm-dhcp-dhclient.c index 2018cdeaf8..043cd63de7 100644 --- a/src/dhcp-manager/nm-dhcp-dhclient.c +++ b/src/dhcp-manager/nm-dhcp-dhclient.c @@ -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; }