From 435dec420fce1237b00fe14b817724892aeaeed9 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Mon, 13 Apr 2015 13:35:10 +0200 Subject: wifi: fix memleak in nm_ap_update_from_properties() Fixes: 59c8192b22778ad4e025db7e60828ac8ccbcb070 (cherry picked from commit 3e8d828008fd7a282da2a851f4085cab60c346ce) --- src/devices/wifi/nm-wifi-ap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/devices/wifi') diff --git a/src/devices/wifi/nm-wifi-ap.c b/src/devices/wifi/nm-wifi-ap.c index c0f8b11dff..d70dd9a6d2 100644 --- a/src/devices/wifi/nm-wifi-ap.c +++ b/src/devices/wifi/nm-wifi-ap.c @@ -423,8 +423,11 @@ nm_ap_new_from_properties (const char *supplicant_path, GVariant *properties) if (v) { bytes = g_variant_get_fixed_array (v, &len, 1); if (len == ETH_ALEN) { - addr = nm_utils_hwaddr_ntoa (bytes, len); - nm_ap_set_address (ap, addr); + char *a; + + a = nm_utils_hwaddr_ntoa (bytes, len); + nm_ap_set_address (ap, a); + g_free (a); } g_variant_unref (v); } -- cgit v1.2.3