mirror of git://git.gnupg.org/gnupg.git
agent: Fix non-allocation for pinentry_loopback.
* agent/call-pinentry.c (agent_get_passphrase): Don't allocate, it will be allocated by pinentry_loopback.
This commit is contained in:
parent
f3959f14b6
commit
ce2a84b588
|
@ -1063,12 +1063,10 @@ agent_get_passphrase (ctrl_t ctrl,
|
|||
{
|
||||
size_t size;
|
||||
size_t len = ASSUAN_LINELENGTH/2;
|
||||
unsigned char *buffer = gcry_malloc_secure (len);
|
||||
unsigned char *buffer;
|
||||
|
||||
rc = pinentry_loopback(ctrl, "PASSPHRASE", &buffer, &size, len);
|
||||
if (rc)
|
||||
xfree(buffer);
|
||||
else
|
||||
if (!rc)
|
||||
{
|
||||
buffer[size] = 0;
|
||||
*retpass = buffer;
|
||||
|
|
Loading…
Reference in New Issue