void * reset_point = store_get(0);
const uschar * cp = string_unprinting(US buf);
BIO * bp;
-X509 * x;
+X509 * x = *(X509 **)cert;
int fail = 0;
+if (x) X509_free(x);
+
bp = BIO_new_mem_buf(US cp, -1);
if (!(x = PEM_read_bio_X509(bp, NULL, 0, NULL)))
{
}
void
-tls_free_cert(void * cert)
+tls_free_cert(void ** cert)
{
-X509_free((X509 *)cert);
+X509 * x = *(X509 **)cert;
+if (x)
+ {
+ X509_free(x);
+ *cert = NULL;
+ }
}
{
struct tm tm;
struct tm * tm_p = &tm;
- BOOL mod_tz;
+ BOOL mod_tz = TRUE;
uschar * tz = to_tz(US"GMT0"); /* need to call strptime with baseline TZ */
/* Parse OpenSSL ASN1_TIME_print output. A shame there seems to
}
}
- if (mod_tz);
+ if (mod_tz)
restore_tz(tz);
}
BIO_free(bp);