From 138755d76e64287f3c2be3565df6ce08267b1f60 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Fri, 27 Nov 2009 13:00:43 +0100 Subject: Check that connect hook was not deleted before call to gnutls callback --- src/core/wee-hook.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c index b5470d703..31813426b 100644 --- a/src/core/wee-hook.c +++ b/src/core/wee-hook.c @@ -1508,7 +1508,8 @@ hook_connect_gnutls_set_certificates (gnutls_session_t tls_session, while (ptr_hook) { /* looking for the right hook using to the gnutls session pointer */ - if (HOOK_CONNECT(ptr_hook, gnutls_sess) + if (!ptr_hook->deleted + && HOOK_CONNECT(ptr_hook, gnutls_sess) && (*(HOOK_CONNECT(ptr_hook, gnutls_sess)) == tls_session)) { rc = (int) (HOOK_CONNECT(ptr_hook, gnutls_cb)) -- cgit v1.2.3