libnm: fix leaking private-key in nm_setting_802_1x_set_phase2_private_key()

This commit is contained in:
Thomas Haller 2018-08-30 17:12:20 +02:00
parent 5ef81dc0fb
commit 98ca7022e3

View file

@ -2637,6 +2637,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:// */