mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-02 12:01:32 +01:00
gpg-auth: Fix use after free.
* tools/gpg-auth.c (ssh_authorized_keys): Move free after printing error message. -- Signed-off-by: Jakub Jelen <jjelen@redhat.com> This is part of GnuPG-bug-id: 7129 (cherry picked from commit 9adaa79ab43e2f87178b8ee5ab1a353cba384606)
This commit is contained in:
parent
ece154562f
commit
f549446933
@ -818,7 +818,6 @@ ssh_authorized_keys (const char *user, struct ssh_key_list **r_ssh_key_list)
|
||||
xfree (fname);
|
||||
return err;
|
||||
}
|
||||
xfree (fname);
|
||||
|
||||
maxlen = 2048; /* Set limit. */
|
||||
while ((len = es_read_line (fp, &line, &length_of_line, &maxlen)) > 0)
|
||||
@ -861,6 +860,7 @@ ssh_authorized_keys (const char *user, struct ssh_key_list **r_ssh_key_list)
|
||||
*r_ssh_key_list = ssh_key_list;
|
||||
|
||||
leave:
|
||||
xfree (fname);
|
||||
xfree (line);
|
||||
es_fclose (fp);
|
||||
return err;
|
||||
|
Loading…
x
Reference in New Issue
Block a user