diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2014-06-18 04:51:32 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2014-06-18 04:51:32 +0000 |
commit | 3dd53c2d4a7800aa76ac493de665ece6db85e402 (patch) | |
tree | 56e2fcbfada9cc4d6d9c6f8ecd7957b9b0e8cd9d | |
parent | c87b3072058cda1442510d46153f9b79d562e06a (diff) |
In ssl3_send_newsession_ticket(), fix a memory leak in an error path.
-rw-r--r-- | lib/libssl/src/ssl/s3_srvr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libssl/src/ssl/s3_srvr.c b/lib/libssl/src/ssl/s3_srvr.c index c37cd421dce..cab034d18f5 100644 --- a/lib/libssl/src/ssl/s3_srvr.c +++ b/lib/libssl/src/ssl/s3_srvr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: s3_srvr.c,v 1.64 2014/06/12 15:49:31 deraadt Exp $ */ +/* $OpenBSD: s3_srvr.c,v 1.65 2014/06/18 04:51:31 miod Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -2960,8 +2960,10 @@ ssl3_send_newsession_ticket(SSL *s) */ if (!BUF_MEM_grow(s->init_buf, 26 + EVP_MAX_IV_LENGTH + EVP_MAX_BLOCK_LENGTH + - EVP_MAX_MD_SIZE + slen)) + EVP_MAX_MD_SIZE + slen)) { + free(senc); return (-1); + } p = (unsigned char *)s->init_buf->data; /* do the header */ |