Bugzilla – Attachment 3236 Details for
Bug 2963
On cleanup channels.c leaks the channels array and some x11 structures
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
channel_cleanup.diff
channel_cleanup.diff (text/plain), 1.04 KB, created by
Markus
on 2019-02-06 01:14:05 AEDT
(
hide
)
Description:
channel_cleanup.diff
Filename:
MIME Type:
Creator:
Markus
Created:
2019-02-06 01:14:05 AEDT
Size:
1.04 KB
patch
obsolete
>diff --git a/channels.c b/channels.c >old mode 100644 >new mode 100755 >index 19da16e..e0f9cba >--- a/channels.c >+++ b/channels.c >@@ -639,10 +639,41 @@ void > channel_free_all(struct ssh *ssh) > { > u_int i; >+ struct ssh_channels *sc = ssh->chanctxt; > >- for (i = 0; i < ssh->chanctxt->channels_alloc; i++) >- if (ssh->chanctxt->channels[i] != NULL) >- channel_free(ssh, ssh->chanctxt->channels[i]); >+ >+ for (i = 0; i < sc->channels_alloc; i++) >+ if (sc->channels[i] != NULL) >+ channel_free(ssh, sc->channels[i]); >+ >+ free(sc->channels); >+ sc->channels= NULL; >+ >+ sc->channels_alloc = 0; >+ sc->channel_max_fd = 0; >+ >+ >+ if (sc->x11_saved_display) { >+ free(sc->x11_saved_display); >+ sc->x11_saved_display= NULL; >+ } >+ >+ if (sc->x11_saved_proto) { >+ free(sc->x11_saved_proto); >+ sc->x11_saved_proto= NULL; >+ } >+ >+ if (sc->x11_saved_data) { >+ free(sc->x11_saved_data); >+ sc->x11_saved_data= NULL; >+ sc->x11_saved_data_len = 0; >+ } >+ >+ if (sc->x11_fake_data) { >+ free(sc->x11_fake_data); >+ sc->x11_fake_data= NULL; >+ sc->x11_fake_data_len = 0; >+ } > } > > /*
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2963
: 3236