mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Fix a null-dereference introduced by another mis-fix in r9919.
[originally from svn r9946]
[r9919 == ea301bdd9b
]
This commit is contained in:
parent
adf8b3222f
commit
1073d229ae
14
import.c
14
import.c
@ -1247,11 +1247,15 @@ int sshcom_encrypted(const Filename *filename, char **comment)
|
|||||||
answer = 1;
|
answer = 1;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
*comment = dupstr(key ? key->comment : "");
|
if (key) {
|
||||||
smemclr(key->keyblob, key->keyblob_size);
|
*comment = dupstr(key->comment);
|
||||||
sfree(key->keyblob);
|
smemclr(key->keyblob, key->keyblob_size);
|
||||||
smemclr(key, sizeof(*key));
|
sfree(key->keyblob);
|
||||||
sfree(key);
|
smemclr(key, sizeof(*key));
|
||||||
|
sfree(key);
|
||||||
|
} else {
|
||||||
|
*comment = dupstr("");
|
||||||
|
}
|
||||||
return answer;
|
return answer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user