projects
/
u
/
mdw
/
putty
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8bd9144
)
Another couple of memory leaks.
author
simon
<simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 4 Aug 2013 19:33:57 +0000
(19:33 +0000)
committer
simon
<simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 4 Aug 2013 19:33:57 +0000
(19:33 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@9988
cda61777
-01e9-0310-a592-
d414129be87e
sshdss.c
patch
|
blob
|
blame
|
history
diff --git
a/sshdss.c
b/sshdss.c
index
eba03aa
..
bf6c3ba
100644
(file)
--- a/
sshdss.c
+++ b/
sshdss.c
@@
-268,8
+268,13
@@
static int dss_verifysig(void *key, char *sig, int siglen,
}
r = get160(&sig, &siglen);
s = get160(&sig, &siglen);
- if (!r || !s)
+ if (!r || !s) {
+ if (r)
+ freebn(r);
+ if (s)
+ freebn(s);
return 0;
+ }
/*
* Step 1. w <- s^-1 mod q.
@@
-624,6
+629,7
@@
static unsigned char *dss_sign(void *key, char *data, int datalen, int *siglen)
s = modmul(kinv, hxr, dss->q); /* s = k^-1 * (hash + x*r) mod q */
freebn(hxr);
freebn(kinv);
+ freebn(k);
freebn(hash);
/*