From 56a50b2774f131a285755b820b8317f279abf861 Mon Sep 17 00:00:00 2001
From: miod <>
Date: Wed, 2 Jul 2014 20:45:26 +0000
Subject: Memory leak in error path of the day, from clang via dhill@bitrig; ok
 dhill@bitrig

---
 src/lib/libssl/d1_both.c         | 5 +++--
 src/lib/libssl/src/ssl/d1_both.c | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

(limited to 'src/lib')

diff --git a/src/lib/libssl/d1_both.c b/src/lib/libssl/d1_both.c
index 67efb3346c..bd4267238f 100644
--- a/src/lib/libssl/d1_both.c
+++ b/src/lib/libssl/d1_both.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: d1_both.c,v 1.21 2014/06/12 15:49:31 deraadt Exp $ */
+/* $OpenBSD: d1_both.c,v 1.22 2014/07/02 20:45:26 miod Exp $ */
 /*
  * DTLS implementation written by Nagendra Modadugu
  * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -609,7 +609,8 @@ dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok)
 				goto err;
 			frag_len -= i;
 		}
-		return DTLS1_HM_FRAGMENT_RETRY;
+		i = DTLS1_HM_FRAGMENT_RETRY;
+		goto err;
 	}
 
 	/* read the body of the fragment (header has already been read */
diff --git a/src/lib/libssl/src/ssl/d1_both.c b/src/lib/libssl/src/ssl/d1_both.c
index 67efb3346c..bd4267238f 100644
--- a/src/lib/libssl/src/ssl/d1_both.c
+++ b/src/lib/libssl/src/ssl/d1_both.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: d1_both.c,v 1.21 2014/06/12 15:49:31 deraadt Exp $ */
+/* $OpenBSD: d1_both.c,v 1.22 2014/07/02 20:45:26 miod Exp $ */
 /*
  * DTLS implementation written by Nagendra Modadugu
  * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -609,7 +609,8 @@ dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok)
 				goto err;
 			frag_len -= i;
 		}
-		return DTLS1_HM_FRAGMENT_RETRY;
+		i = DTLS1_HM_FRAGMENT_RETRY;
+		goto err;
 	}
 
 	/* read the body of the fragment (header has already been read */
-- 
cgit v1.2.3-55-g6feb