reds: Remove possible leak during SASL authentication

We need to free the connection if the mechanism name is wrong

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
This commit is contained in:
Frediano Ziglio 2017-12-12 17:20:39 +00:00
parent 158ab5f921
commit 83c5fa8d32

View File

@ -2202,6 +2202,7 @@ static void reds_handle_auth_mechname(void *opaque)
if (!red_sasl_handle_auth_mechname(link->stream, reds_handle_auth_startlen, link)) {
reds_send_link_error(link, SPICE_LINK_ERR_INVALID_DATA);
reds_link_free(link);
}
}