From 59f943b0e4ce884ca5b518e7c20fb4ff938d0474 Mon Sep 17 00:00:00 2001 From: Alan Antonuk Date: Mon, 22 Jul 2013 16:07:35 -0700 Subject: BUG: double-free in ssl-socket on connect failure In amqp_ssl_socket_open() set self->ssl to NULL after SSL_free() to avoid calling SSL_free() on a SSL object that has already been freed. This fixes #129 crash while call amqp_destroy_connection() with ssl --- librabbitmq/amqp_openssl.c | 1 + 1 file changed, 1 insertion(+) (limited to 'librabbitmq') diff --git a/librabbitmq/amqp_openssl.c b/librabbitmq/amqp_openssl.c index f70d377..1233b31 100644 --- a/librabbitmq/amqp_openssl.c +++ b/librabbitmq/amqp_openssl.c @@ -297,6 +297,7 @@ error_out2: self->sockfd = -1; error_out1: SSL_free(self->ssl); + self->ssl = NULL; goto exit; } -- cgit v1.2.1