This is a discussion on [PATCH 4/12] bug fix: openssh-4.3p2 memory leak within the OpenSSH Development forums, part of the Networking and Network Related category; If the operation in the function is not allowed memory is leaked in three variables which were xmalloc'ed with ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
If the operation in the function is not allowed memory is leaked in
three variables which were xmalloc'ed with buffer_get_string. In the allowed case these variables are pointed to by variables with a greater scope thus the reason this is a condtional leak. This entire set of patches passed the regression tests on my system. Resource leak bugs found by Coverity. Signed-off-by: Kylene Hall <kjhall@us.ibm.com> --- monitor.c | 4 ++++ 1 files changed, 4 insertions(+) diff -uprN openssh-4.3p2/monitor.c openssh-4.3p2-kylie/monitor.c --- openssh-4.3p2/monitor.c 2005-11-04 22:07:05.000000000 -0600 +++ openssh-4.3p2-kylie/monitor.c 2006-05-08 17:18:15.697809744 -0500 @@ -1010,6 +1010,10 @@ mm_answer_keyallowed(int sock, Buffer *m key_blobtype = type; hostbased_cuser = cuser; hostbased_chost = chost; + } else { + xfree(blob); + xfree(chost); + xfree(cuser); } debug3("%s: key %p is %s", _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@mindrot.org http://www.mindrot.org/mailman/listi...enssh-unix-dev |