diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2015-04-13 13:35:10 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-06-20 11:36:55 +0200 |
commit | 435dec420fce1237b00fe14b817724892aeaeed9 (patch) | |
tree | 21dfbed781824b8f8d43d3351ec8df6f53e7d890 /src/devices/wifi | |
parent | 5fa0b8a222c76acd75cd0af9f89af1e0984fd287 (diff) |
wifi: fix memleak in nm_ap_update_from_properties()
Fixes: 59c8192b22778ad4e025db7e60828ac8ccbcb070
(cherry picked from commit 3e8d828008fd7a282da2a851f4085cab60c346ce)
Diffstat (limited to 'src/devices/wifi')
-rw-r--r-- | src/devices/wifi/nm-wifi-ap.c | 7 |
1 files changed, 5 insertions, 2 deletions
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); } |