mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 14:20:16 +01:00
ifcfg: fix a possible double-free error on invalid WEP key (rh #1281324)
https://bugzilla.redhat.com/show_bug.cgi?id=1281324
This commit is contained in:
parent
914d875dc2
commit
f902444325
1 changed files with 12 additions and 8 deletions
|
|
@ -713,15 +713,19 @@ write_wireless_security_setting (NMConnection *connection,
|
|||
ascii_key = g_strdup_printf ("s:%s", key);
|
||||
key = ascii_key;
|
||||
}
|
||||
} else
|
||||
key = NULL;
|
||||
} else {
|
||||
nm_log_warn (LOGD_SETTINGS, " invalid WEP key '%s'", key);
|
||||
tmp = NULL;
|
||||
}
|
||||
|
||||
set_secret (ifcfg,
|
||||
tmp,
|
||||
key,
|
||||
"WEP_KEY_FLAGS",
|
||||
nm_setting_wireless_security_get_wep_key_flags (s_wsec),
|
||||
FALSE);
|
||||
if (tmp) {
|
||||
set_secret (ifcfg,
|
||||
tmp,
|
||||
key,
|
||||
"WEP_KEY_FLAGS",
|
||||
nm_setting_wireless_security_get_wep_key_flags (s_wsec),
|
||||
FALSE);
|
||||
}
|
||||
g_free (tmp);
|
||||
g_free (ascii_key);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue