[PATCH 4/12] bug fix: openssh-4.3p2 memory leak

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 ...


Go Back   Usenet Forums > Networking and Network Related > OpenSSH Development

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-16-2006
Kylene Jo Hall
 
Posts: n/a
Default [PATCH 4/12] bug fix: openssh-4.3p2 memory leak

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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:29 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0