Bugzilla – Attachment 2822 Details for
Bug 2581
Coverity patches from Fedora
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch for points 1 - 5
coverity.ssh.patch (text/plain), 2.29 KB, created by
Jakub Jelen
on 2016-06-03 20:48:02 AEST
(
hide
)
Description:
Proposed patch for points 1 - 5
Filename:
MIME Type:
Creator:
Jakub Jelen
Created:
2016-06-03 20:48:02 AEST
Size:
2.29 KB
patch
obsolete
>From b404c4baf6888d8ef416bf9ff04e4f78ebc10025 Mon Sep 17 00:00:00 2001 >From: Jakub Jelen <jjelen@redhat.com> >Date: Fri, 3 Jun 2016 12:42:24 +0200 >Subject: [PATCH] Coverity and memory leaks > >--- > monitor.c | 7 ++++--- > monitor_wrap.c | 4 +--- > servconf.c | 3 --- > sshd.c | 7 ++++++- > 4 files changed, 11 insertions(+), 10 deletions(-) > >diff --git a/monitor.c b/monitor.c >index 8b3c27a..9a52f50 100644 >--- a/monitor.c >+++ b/monitor.c >@@ -1253,6 +1253,10 @@ mm_answer_keyallowed(int sock, Buffer *m) > break; > } > } >+ >+ debug3("%s: key %p is %s", >+ __func__, key, allowed ? "allowed" : "not allowed"); >+ > if (key != NULL) > key_free(key); > >@@ -1274,9 +1278,6 @@ mm_answer_keyallowed(int sock, Buffer *m) > free(chost); > } > >- debug3("%s: key %p is %s", >- __func__, key, allowed ? "allowed" : "not allowed"); >- > buffer_clear(m); > buffer_put_int(m, allowed); > buffer_put_int(m, forced_command != NULL); >diff --git a/monitor_wrap.c b/monitor_wrap.c >index 5520049..12d0004 100644 >--- a/monitor_wrap.c >+++ b/monitor_wrap.c >@@ -502,10 +502,8 @@ mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) > if ((tmp1 = dup(pmonitor->m_recvfd)) == -1 || > (tmp2 = dup(pmonitor->m_recvfd)) == -1) { > error("%s: cannot allocate fds for pty", __func__); >- if (tmp1 > 0) >+ if (tmp1 >= 0) > close(tmp1); >- if (tmp2 > 0) >- close(tmp2); > return 0; > } > close(tmp1); >diff --git a/servconf.c b/servconf.c >index 1cb45f5..d5f77df 100644 >--- a/servconf.c >+++ b/servconf.c >@@ -1592,9 +1592,6 @@ process_server_config_line(ServerOptions *options, char *line, > filename, linenum); > if (*activep && *charptr == NULL) { > *charptr = tilde_expand_filename(arg, getuid()); >- /* increase optional counter */ >- if (intptr != NULL) >- *intptr = *intptr + 1; > } > break; > >diff --git a/sshd.c b/sshd.c >index 0200691..f568b20 100644 >--- a/sshd.c >+++ b/sshd.c >@@ -721,8 +721,10 @@ privsep_preauth(Authctxt *authctxt) > > privsep_preauth_child(); > setproctitle("%s", "[net]"); >- if (box != NULL) >+ if (box != NULL) { > ssh_sandbox_child(box); >+ free(box); >+ } > > return 0; > } >@@ -1467,6 +1469,9 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s) > if (num_listen_socks < 0) > break; > } >+ >+ if (fdset != NULL) >+ free(fdset); > } > > /* >-- >2.5.5 >
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 2581
: 2822 |
2823