Bugzilla – Attachment 3208 Details for
Bug 2938
minor memory leak during channel_init_channels()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to fix memory leak
channels.patch (text/plain), 691 bytes, created by
Markus
on 2018-12-05 03:09:46 AEDT
(
hide
)
Description:
patch to fix memory leak
Filename:
MIME Type:
Creator:
Markus
Created:
2018-12-05 03:09:46 AEDT
Size:
691 bytes
patch
obsolete
> >diff --git a/channels.c b/channels.c >index e3b9eea..e0df8a9 100755 >--- a/channels.c >+++ b/channels.c >@@ -221,11 +221,7 @@ channel_init_channels(struct ssh *ssh) > { > struct ssh_channels *sc; > >- if ((sc = calloc(1, sizeof(*sc))) == NULL || >- (sc->channel_pre = calloc(SSH_CHANNEL_MAX_TYPE, >- sizeof(*sc->channel_pre))) == NULL || >- (sc->channel_post = calloc(SSH_CHANNEL_MAX_TYPE, >- sizeof(*sc->channel_post))) == NULL) >+ if ((sc = calloc(1, sizeof(*sc))) == NULL) > fatal("%s: allocation failed", __func__); > sc->channels_alloc = 10; > sc->channels = xcalloc(sc->channels_alloc, sizeof(*sc->channels)); > >
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 2938
: 3208