summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-05-25 14:29:39 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-05-25 14:29:39 +0000
commit2c77c5c8dbbacb97c5ff9eea2fe274d5c92f72b8 (patch)
treeec284a9bd2b4986e9ef4d672b62b6e7fd56806e9 /ssl
parent1eb38c563fc8659b10e65831fcaed6059790bfc2 (diff)
Oops use up to date patch for PR#2506
Diffstat (limited to 'ssl')
-rw-r--r--ssl/d1_lib.c13
-rw-r--r--ssl/d1_srvr.c5
2 files changed, 16 insertions, 2 deletions
diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c
index 7a5a8c0401..15dea6ed4a 100644
--- a/ssl/d1_lib.c
+++ b/ssl/d1_lib.c
@@ -149,15 +149,26 @@ static void dtls1_clear_queues(SSL *s)
{
pitem *item = NULL;
hm_fragment *frag = NULL;
-
+ DTLS1_RECORD_DATA *rdata;
+
while( (item = pqueue_pop(s->d1->unprocessed_rcds.q)) != NULL)
{
+ rdata = (DTLS1_RECORD_DATA *) item->data;
+ if (rdata->rbuf.buf)
+ {
+ OPENSSL_free(rdata->rbuf.buf);
+ }
OPENSSL_free(item->data);
pitem_free(item);
}
while( (item = pqueue_pop(s->d1->processed_rcds.q)) != NULL)
{
+ rdata = (DTLS1_RECORD_DATA *) item->data;
+ if (rdata->rbuf.buf)
+ {
+ OPENSSL_free(rdata->rbuf.buf);
+ }
OPENSSL_free(item->data);
pitem_free(item);
}
diff --git a/ssl/d1_srvr.c b/ssl/d1_srvr.c
index b271ff92dc..79331df6b5 100644
--- a/ssl/d1_srvr.c
+++ b/ssl/d1_srvr.c
@@ -148,6 +148,7 @@ int dtls1_accept(SSL *s)
void (*cb)(const SSL *ssl,int type,int val)=NULL;
int ret= -1;
int new_state,state,skip=0;
+ int listen;
RAND_add(&Time,sizeof(Time),0);
ERR_clear_error();
@@ -157,6 +158,8 @@ int dtls1_accept(SSL *s)
cb=s->info_callback;
else if (s->ctx->info_callback != NULL)
cb=s->ctx->info_callback;
+
+ listen = s->d1->listen;
/* init things to blank */
s->in_handshake++;
@@ -272,7 +275,7 @@ int dtls1_accept(SSL *s)
s->init_num=0;
/* If we're just listening, stop here */
- if (s->d1->listen && s->state == SSL3_ST_SW_SRVR_HELLO_A)
+ if (listen && s->state == SSL3_ST_SW_SRVR_HELLO_A)
{
ret = 2;
s->d1->listen = 0;