mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Another couple of memory leaks.
[originally from svn r9988]
This commit is contained in:
parent
5bcb8d6aac
commit
bf9b9224d8
8
sshdss.c
8
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);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user