mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
(read_passphrase_from_fd): Fixed memory leak.
Noted by Andrei Darashenka.
This commit is contained in:
parent
e4280026f4
commit
1037420b76
2 changed files with 9 additions and 1 deletions
|
@ -173,7 +173,10 @@ read_passphrase_from_fd( int fd )
|
|||
len += 100;
|
||||
pw = m_alloc_secure( len );
|
||||
if( pw2 )
|
||||
memcpy(pw, pw2, i );
|
||||
{
|
||||
memcpy(pw, pw2, i );
|
||||
m_free (pw2);
|
||||
}
|
||||
else
|
||||
i=0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue