mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
tools: Avoid memory leaks.
* tools/gpg-auth.c (ssh_authorized_keys): Free list on error. * tools/gpgtar-extract.c (gpgtar_extract): Free memory on error. -- GnuPG-bug-id: 7201 Signed-off-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
parent
3caf26f324
commit
e8c8068dec
@ -825,6 +825,7 @@ ssh_authorized_keys (const char *user, struct ssh_key_list **r_ssh_key_list)
|
|||||||
{
|
{
|
||||||
err = gpg_error (GPG_ERR_LINE_TOO_LONG);
|
err = gpg_error (GPG_ERR_LINE_TOO_LONG);
|
||||||
log_error (_("error reading '%s': %s\n"), fname, gpg_strerror (err));
|
log_error (_("error reading '%s': %s\n"), fname, gpg_strerror (err));
|
||||||
|
release_ssh_key_list (ssh_key_list);
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -467,7 +467,7 @@ gpgtar_extract (const char *filename, int decrypt)
|
|||||||
{
|
{
|
||||||
err = gpg_error_from_syserror ();
|
err = gpg_error_from_syserror ();
|
||||||
log_error ("error opening '%s': %s\n", filename, gpg_strerror (err));
|
log_error ("error opening '%s': %s\n", filename, gpg_strerror (err));
|
||||||
return err;
|
goto leave;
|
||||||
}
|
}
|
||||||
if (stream == es_stdin)
|
if (stream == es_stdin)
|
||||||
es_set_binary (es_stdin);
|
es_set_binary (es_stdin);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user