mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 02:00:15 +01:00
ifcfg-rh: fix memleak due to make_wpa_setting() returning both wsec and error
==10501== 353 (32 direct, 321 indirect) bytes in 1 blocks are definitely lost in loss record 1,579 of 1,641
==10501== at 0x7EE3728: g_type_create_instance (gtype.c:1847)
==10501== by 0x7EC75B4: g_object_new_internal (gobject.c:1746)
==10501== by 0x7EC945C: g_object_newv (gobject.c:1890)
==10501== by 0x7EC9C23: g_object_new (gobject.c:1556)
==10501== by 0x1CD87C: nm_setting_wireless_security_new (nm-setting-wireless-security.c:122)
==10501== by 0x16F70B: make_wpa_setting (reader.c:3010)
==10501== by 0x16F33F: make_wireless_security_setting (reader.c:3188)
==10501== by 0x161F4C: wireless_connection_from_ifcfg (reader.c:3464)
==10501== by 0x16109A: connection_from_file_full (reader.c:4763)
==10501== by 0x1614EE: connection_from_file_test (reader.c:4862)
==10501== by 0x13D1D6: test_read_wifi_wpa_psk_unquoted2 (test-ifcfg-rh.c:4316)
==10501== by 0x1281FD: main (test-ifcfg-rh.c:12513)
==10501==
This commit is contained in:
parent
98a0299265
commit
fcfd8f487a
1 changed files with 2 additions and 1 deletions
|
|
@ -3073,7 +3073,8 @@ make_wpa_setting (shvarFile *ifcfg,
|
|||
if (psk) {
|
||||
g_object_set (wsec, NM_SETTING_WIRELESS_SECURITY_PSK, psk, NULL);
|
||||
g_free (psk);
|
||||
}
|
||||
} else if (error)
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (adhoc)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue