]> andersk Git - openssh.git/blobdiff - ssh-dss.c
- deraadt@cvs.openbsd.org 2002/07/04 04:15:33
[openssh.git] / ssh-dss.c
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;
 }
This page took 0.037291 seconds and 4 git commands to generate.