From 408eaf3ab716096f8faf30f091bd54a2c7a17a09 Mon Sep 17 00:00:00 2001
From: Darren Tucker <dtucker@zip.com.au>
Date: Thu, 6 Jun 2013 08:22:46 +1000
Subject: [PATCH]    - dtucker@cvs.openbsd.org 2013/06/05 22:00:28     
 [readconf.c]      plug another memleak.  bz#1967, from Zhenbo Xu, detected by
 Melton, ok djm

---
 ChangeLog  | 3 +++
 readconf.c | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 43a6e7d16..90ce8610f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -43,6 +43,9 @@
    - dtucker@cvs.openbsd.org 2013/06/05 12:52:38
      [sshconnect2.c]
      Fix memory leaks found by Zhenbo Xu and the Melton tool.  bz#1967, ok djm
+   - dtucker@cvs.openbsd.org 2013/06/05 22:00:28
+     [readconf.c]
+     plug another memleak.  bz#1967, from Zhenbo Xu, detected by Melton, ok djm
 
 20130602
  - (tim) [Makefile.in] Make Solaris, UnixWare, & OpenServer linkers happy
diff --git a/readconf.c b/readconf.c
index 45cf910fe..7c1c795fe 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: readconf.c,v 1.202 2013/05/17 00:13:14 djm Exp $ */
+/* $OpenBSD: readconf.c,v 1.203 2013/06/05 22:00:28 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -820,6 +820,8 @@ parse_int:
 			else if (opcode == oRemoteForward)
 				add_remote_forward(options, &fwd);
 		}
+		free(fwd.connect_host);
+		free(fwd.listen_host);
 		break;
 
 	case oClearAllForwardings: