1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -05:00

Remove assorted dead code.

Assignments that are overwritten shortly afterwards and never used,
and a completely unused variable. Also, the bogus array access in
testbn.c could have actually accessed one beyond the array limit
(though of course it's only in a test harness).
This commit is contained in:
Simon Tatham
2017-02-14 20:22:05 +00:00
parent b03020cab9
commit f2e76e07da
4 changed files with 1 additions and 12 deletions

View File

@ -1547,15 +1547,11 @@ struct ssh2_userkey *openssh_new_read(const Filename *filename,
int i;
struct ssh2_userkey *retval = NULL;
const char *errmsg;
unsigned char *blob;
int blobsize = 0;
unsigned checkint0, checkint1;
const void *priv, *string;
int privlen, stringlen, key_index;
const struct ssh_signkey *alg = NULL;
blob = NULL;
if (!key)
return NULL;
@ -1721,10 +1717,6 @@ struct ssh2_userkey *openssh_new_read(const Filename *filename,
retkey = NULL; /* prevent the free */
error:
if (blob) {
smemclr(blob, blobsize);
sfree(blob);
}
if (retkey) {
sfree(retkey->comment);
if (retkey->data) {