mirror of
git://anongit.mindrot.org/openssh.git
synced 2025-02-18 06:46:55 +00:00
- dtucker@cvs.openbsd.org 2013/06/05 02:07:29
[mux.c] fix leaks in mux error paths, from Zhenbo Xu, found by Melton. bz#1967, ok djm
This commit is contained in:
parent
ea64721275
commit
746e9067bd
@ -31,6 +31,10 @@
|
||||
the quoted string by character instead of by byte. Prevents failures
|
||||
when linked against a libedit built with wide character support (bz#1990).
|
||||
"looks ok" djm
|
||||
- dtucker@cvs.openbsd.org 2013/06/05 02:07:29
|
||||
[mux.c]
|
||||
fix leaks in mux error paths, from Zhenbo Xu, found by Melton. bz#1967,
|
||||
ok djm
|
||||
|
||||
20130602
|
||||
- (tim) [Makefile.in] Make Solaris, UnixWare, & OpenServer linkers happy
|
||||
|
8
mux.c
8
mux.c
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: mux.c,v 1.42 2013/06/02 23:36:29 dtucker Exp $ */
|
||||
/* $OpenBSD: mux.c,v 1.43 2013/06/05 02:07:29 dtucker Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
|
||||
*
|
||||
@ -288,6 +288,7 @@ process_mux_master_hello(u_int rid, Channel *c, Buffer *m, Buffer *r)
|
||||
|
||||
if (name == NULL || value == NULL) {
|
||||
free(name);
|
||||
free(value);
|
||||
goto malf;
|
||||
}
|
||||
debug2("Unrecognised slave extension \"%s\"", name);
|
||||
@ -1427,7 +1428,9 @@ mux_client_read_packet(int fd, Buffer *m)
|
||||
buffer_init(&queue);
|
||||
if (mux_client_read(fd, &queue, 4) != 0) {
|
||||
if ((oerrno = errno) == EPIPE)
|
||||
debug3("%s: read header failed: %s", __func__, strerror(errno));
|
||||
debug3("%s: read header failed: %s", __func__,
|
||||
strerror(errno));
|
||||
buffer_free(&queue);
|
||||
errno = oerrno;
|
||||
return -1;
|
||||
}
|
||||
@ -1435,6 +1438,7 @@ mux_client_read_packet(int fd, Buffer *m)
|
||||
if (mux_client_read(fd, &queue, need) != 0) {
|
||||
oerrno = errno;
|
||||
debug3("%s: read body failed: %s", __func__, strerror(errno));
|
||||
buffer_free(&queue);
|
||||
errno = oerrno;
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user