Commit 545426f9 authored by Thomas Guillem's avatar Thomas Guillem

gnutls: move error label

Going up to an error label is disturbing.
parent fd6a25a7
...@@ -426,10 +426,7 @@ static int gnutls_ClientHandshake(vlc_tls_creds_t *creds, vlc_tls_t *tls, ...@@ -426,10 +426,7 @@ static int gnutls_ClientHandshake(vlc_tls_creds_t *creds, vlc_tls_t *tls,
{ {
msg_Err(creds, "Certificate verification error: %s", msg_Err(creds, "Certificate verification error: %s",
gnutls_strerror(val)); gnutls_strerror(val));
error: goto error;
if (alp != NULL)
free(*alp);
return -1;
} }
if (status == 0) /* Good certificate */ if (status == 0) /* Good certificate */
...@@ -535,6 +532,11 @@ error: ...@@ -535,6 +532,11 @@ error:
goto error; goto error;
} }
return 0; return 0;
error:
if (alp != NULL)
free(*alp);
return -1;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment