mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
agent: Correctly free memory on error path.
* agent/protect.c (merge_lists): Free memory on error. -- GnuPG-bug-id: 5393 Signed-off-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
parent
c0b1bcc5c6
commit
50f32eb066
@ -970,7 +970,10 @@ merge_lists (const unsigned char *protectedkey,
|
||||
/* Copy the cleartext. */
|
||||
s = cleartext;
|
||||
if (*s != '(' && s[1] != '(')
|
||||
return gpg_error (GPG_ERR_BUG); /*we already checked this */
|
||||
{
|
||||
xfree (newlist);
|
||||
return gpg_error (GPG_ERR_BUG); /*we already checked this */
|
||||
}
|
||||
s += 2;
|
||||
startpos = s;
|
||||
while ( *s == '(' )
|
||||
|
Loading…
x
Reference in New Issue
Block a user