]> andersk Git - openssh.git/commitdiff
- deraadt@cvs.openbsd.org 2002/07/04 04:15:33
authormouring <mouring>
Sun, 7 Jul 2002 22:10:15 +0000 (22:10 +0000)
committermouring <mouring>
Sun, 7 Jul 2002 22:10:15 +0000 (22:10 +0000)
     [key.c monitor_wrap.c sftp-glob.c ssh-dss.c ssh-rsa.c]
     patch memory leaks; grendel@zeitbombe.org

ChangeLog
key.c
monitor_wrap.c
sftp-glob.c
ssh-dss.c
ssh-rsa.c

index 7aeca78512f3fca7621e5a24b864d181ea708305..ea5358d77dbd3e086c3d9ff15861311d36c7f367 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,10 @@
  - (tim) [contrib/cygwin/ssh-host-config] sshd account creation fixes
    patch from vinschen@redhat.com
  - (bal) [realpath.c] Updated with OpenBSD tree.
+ - (bal) OpenBSD CVS Sync
+   - deraadt@cvs.openbsd.org 2002/07/04 04:15:33
+     [key.c monitor_wrap.c sftp-glob.c ssh-dss.c ssh-rsa.c]
+     patch memory leaks; grendel@zeitbombe.org
 
 20020705
  - (tim) [configure.ac] AIX 4.2.1 has authenticate() in libs.
diff --git a/key.c b/key.c
index 718cd16c0cd7012c417cdb09a0bd6c794450f28e..34b36b0ebfee29b8132f59dc7866cdf67a062d9f 100644 (file)
--- a/key.c
+++ b/key.c
@@ -32,7 +32,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include "includes.h"
-RCSID("$OpenBSD: key.c,v 1.46 2002/06/30 21:59:45 deraadt Exp $");
+RCSID("$OpenBSD: key.c,v 1.47 2002/07/04 04:15:33 deraadt Exp $");
 
 #include <openssl/evp.h>
 
@@ -763,6 +763,8 @@ key_to_blob(Key *key, u_char **blobp, u_int *lenp)
                *lenp = len;
        if (blobp != NULL)
                *blobp = buf;
+       else
+               xfree(buf);
        return len;
 }
 
index eb4453fc4404289af539ac2065e106218e9574dd..1719f89d2e6706b217788c6d24b3630c069bea02 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: monitor_wrap.c,v 1.14 2002/06/30 21:59:45 deraadt Exp $");
+RCSID("$OpenBSD: monitor_wrap.c,v 1.15 2002/07/04 04:15:33 deraadt Exp $");
 
 #include <openssl/bn.h>
 #include <openssl/dh.h>
@@ -492,6 +492,8 @@ mm_newkeys_to_blob(int mode, u_char **blobp, u_int *lenp)
                *lenp = len;
        if (blobp != NULL)
                *blobp = buf;
+       else
+               xfree(blobp);
        return len;
 }
 
index 2deb0eb49bced75f04ee44bc9b1d8da431dc368c..2a7cf141cc20bc6db1c3064978d0079d7fde4232 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: sftp-glob.c,v 1.11 2002/06/30 21:59:45 deraadt Exp $");
+RCSID("$OpenBSD: sftp-glob.c,v 1.12 2002/07/04 04:15:33 deraadt Exp $");
 
 #include "buffer.h"
 #include "bufaux.h"
@@ -51,8 +51,10 @@ fudge_opendir(const char *path)
 
        r = xmalloc(sizeof(*r));
 
-       if (do_readdir(cur.conn, (char *)path, &r->dir))
+       if (do_readdir(cur.conn, (char *)path, &r->dir)) {
+               xfree(r);
                return(NULL);
+       }
 
        r->offset = 0;
 
index dbf8465bae54612d6160c2f7e7fff0f06f4b0d01..0215f1c9a8b6c6946d6addb749dac06fc0d2196a 100644 (file)
--- a/ssh-dss.c
+++ b/ssh-dss.c
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ssh-dss.c,v 1.15 2002/06/23 03:30:17 deraadt Exp $");
+RCSID("$OpenBSD: ssh-dss.c,v 1.16 2002/07/04 04:15:33 deraadt Exp $");
 
 #include <openssl/bn.h>
 #include <openssl/evp.h>
@@ -85,6 +85,8 @@ ssh_dss_sign(Key *key, u_char **sigp, u_int *lenp,
                        *lenp = SIGBLOB_LEN;
                if (sigp != NULL)
                        *sigp = ret;
+               else
+                       xfree(ret);
        } else {
                /* ietf-drafts */
                buffer_init(&b);
@@ -98,6 +100,8 @@ ssh_dss_sign(Key *key, u_char **sigp, u_int *lenp,
                        *lenp = len;
                if (sigp != NULL)
                        *sigp = ret;
+               else
+                       xfree(ret);
        }
        return 0;
 }
index 782279bad23b9fae75f22022bdec879cfea7bb0c..c7f5ed0b3a8aed4c0b67e9a710d690163e7ef9c0 100644 (file)
--- a/ssh-rsa.c
+++ b/ssh-rsa.c
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ssh-rsa.c,v 1.21 2002/06/23 03:30:17 deraadt Exp $");
+RCSID("$OpenBSD: ssh-rsa.c,v 1.22 2002/07/04 04:15:33 deraadt Exp $");
 
 #include <openssl/evp.h>
 #include <openssl/err.h>
@@ -100,6 +100,8 @@ ssh_rsa_sign(Key *key, u_char **sigp, u_int *lenp,
                *lenp = len;
        if (sigp != NULL)
                *sigp = ret;
+       else
+               xfree(ret);
        return 0;
 }
 
This page took 0.072058 seconds and 5 git commands to generate.