mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-13 18:12:03 +08:00
avoid deinitializing garbage
This commit is contained in:
+3
-2
@@ -258,7 +258,7 @@ int ret;
|
|||||||
static void certificate_check(main_server_st *s)
|
static void certificate_check(main_server_st *s)
|
||||||
{
|
{
|
||||||
gnutls_datum_t data;
|
gnutls_datum_t data;
|
||||||
gnutls_x509_crt_t crt;
|
gnutls_x509_crt_t crt = NULL;
|
||||||
int ret;
|
int ret;
|
||||||
unsigned usage;
|
unsigned usage;
|
||||||
|
|
||||||
@@ -292,7 +292,8 @@ unsigned usage;
|
|||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
gnutls_x509_crt_deinit(crt);
|
if (crt != NULL)
|
||||||
|
gnutls_x509_crt_deinit(crt);
|
||||||
gnutls_free(data.data);
|
gnutls_free(data.data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user