mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-30 09:14:59 +02:00
upstream: fix memory leak of mux_ctx; patch from Sergiy Lozovsky
via bz3189 ok dtucker OpenBSD-Commit-ID: db249bd4526fd42d0f4f43f72f7b8b7705253bde
This commit is contained in:
parent
55ef3e9cbd
commit
1b90ddde49
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: channels.c,v 1.398 2020/04/25 06:59:36 dtucker Exp $ */
|
/* $OpenBSD: channels.c,v 1.399 2020/07/03 05:08:41 djm Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
@ -621,6 +621,8 @@ channel_free(struct ssh *ssh, Channel *c)
|
|||||||
c->path = NULL;
|
c->path = NULL;
|
||||||
free(c->listening_addr);
|
free(c->listening_addr);
|
||||||
c->listening_addr = NULL;
|
c->listening_addr = NULL;
|
||||||
|
free(c->mux_ctx);
|
||||||
|
c->mux_ctx = NULL;
|
||||||
while ((cc = TAILQ_FIRST(&c->status_confirms)) != NULL) {
|
while ((cc = TAILQ_FIRST(&c->status_confirms)) != NULL) {
|
||||||
if (cc->abandon_cb != NULL)
|
if (cc->abandon_cb != NULL)
|
||||||
cc->abandon_cb(ssh, c, cc->ctx);
|
cc->abandon_cb(ssh, c, cc->ctx);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user