libnm: fix leaking private-key in nm_setting_802_1x_set_phase2_private_key()

(cherry picked from commit 98ca7022e3)
This commit is contained in:
Thomas Haller 2018-08-30 17:12:20 +02:00
parent 74fc6f30b2
commit 478804780d

View file

@ -2639,6 +2639,7 @@ nm_setting_802_1x_set_phase2_private_key (NMSetting8021x *setting,
password_changed = TRUE;
}
g_bytes_unref (priv->phase2_private_key);
if (scheme == NM_SETTING_802_1X_CK_SCHEME_BLOB) {
/* FIXME: potential race after verifying the private key above */
/* FIXME: ensure blob doesn't start with file:// */