(EC)DH memory handling fixes.

Submitted by: Adam Langley
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c
index 9d25e99..11c2190 100644
--- a/ssl/s3_lib.c
+++ b/ssl/s3_lib.c
@@ -3021,11 +3021,17 @@
 		}
 #ifndef OPENSSL_NO_DH
 	if (s->s3->tmp.dh != NULL)
+		{
 		DH_free(s->s3->tmp.dh);
+		s->s3->tmp.dh = NULL;
+		}
 #endif
 #ifndef OPENSSL_NO_ECDH
 	if (s->s3->tmp.ecdh != NULL)
+		{
 		EC_KEY_free(s->s3->tmp.ecdh);
+		s->s3->tmp.ecdh = NULL;
+		}
 #endif
 
 	rp = s->s3->rbuf.buf;