wifi: fix memleak in nm_ap_update_from_properties()

Fixes: 59c8192b22
(cherry picked from commit 3e8d828008)
This commit is contained in:
Beniamino Galvani 2015-04-13 13:35:10 +02:00 committed by Thomas Haller
parent 5fa0b8a222
commit 435dec420f

View file

@ -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);
}