diff --git a/ChangeLog b/ChangeLog index cd7b523fc..72a50c729 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,6 +24,10 @@ [PROTOCOL.mux] correct types of port numbers (integers, not strings); bz#2004 from bert.wesarg AT googlemail.com + - djm@cvs.openbsd.org 2012/06/01 01:01:22 + [mux.c] + fix memory leak when mux socket creation fails; bz#2002 from bert.wesarg + AT googlemail.com 20120519 - (dtucker) [configure.ac] bz#2010: fix non-portable shell construct. Patch diff --git a/mux.c b/mux.c index d90605eb4..3dd5e262c 100644 --- a/mux.c +++ b/mux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.34 2012/01/07 21:11:36 djm Exp $ */ +/* $OpenBSD: mux.c,v 1.35 2012/06/01 01:01:22 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller * @@ -1195,6 +1195,7 @@ muxserver_listen(void) close(muxserver_sock); muxserver_sock = -1; } + xfree(orig_control_path); xfree(options.control_path); options.control_path = NULL; options.control_master = SSHCTL_MASTER_NO; @@ -1216,7 +1217,6 @@ muxserver_listen(void) } error("ControlSocket %s already exists, disabling multiplexing", orig_control_path); - xfree(orig_control_path); unlink(options.control_path); goto disable_mux_master; }