mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38: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;
|
||||
|
||||
done:
|
||||
*comment = dupstr(key ? key->comment : "");
|
||||
smemclr(key->keyblob, key->keyblob_size);
|
||||
sfree(key->keyblob);
|
||||
smemclr(key, sizeof(*key));
|
||||
sfree(key);
|
||||
if (key) {
|
||||
*comment = dupstr(key->comment);
|
||||
smemclr(key->keyblob, key->keyblob_size);
|
||||
sfree(key->keyblob);
|
||||
smemclr(key, sizeof(*key));
|
||||
sfree(key);
|
||||
} else {
|
||||
*comment = dupstr("");
|
||||
}
|
||||
return answer;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user