diff options
author | Alan Antonuk <alan.antonuk@gmail.com> | 2013-07-22 16:07:35 -0700 |
---|---|---|
committer | Alan Antonuk <alan.antonuk@gmail.com> | 2013-07-22 16:07:35 -0700 |
commit | 59f943b0e4ce884ca5b518e7c20fb4ff938d0474 (patch) | |
tree | 76afc324a284ff121b6b0e14b4dcb5967ff461cc /librabbitmq | |
parent | 4eaf771fa5f7807c38276b26aaa410bfd136d382 (diff) | |
download | rabbitmq-c-github-ask-59f943b0e4ce884ca5b518e7c20fb4ff938d0474.tar.gz |
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
Diffstat (limited to 'librabbitmq')
-rw-r--r-- | librabbitmq/amqp_openssl.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |