mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-18 14:17:03 +01:00
gpg: Do not close stdout after --export-ssh-key
* g10/export.c (export_ssh_key): Do not close stdout. -- stdout should never be closed; this fixes this minor bug. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
b4cbb5f58a
commit
970e431305
@ -2458,7 +2458,7 @@ export_ssh_key (ctrl_t ctrl, const char *userid)
|
||||
err = gpg_error_from_syserror ();
|
||||
else
|
||||
{
|
||||
if (es_fclose (fp))
|
||||
if (fp != es_stdout && es_fclose (fp))
|
||||
err = gpg_error_from_syserror ();
|
||||
fp = NULL;
|
||||
}
|
||||
@ -2467,6 +2467,7 @@ export_ssh_key (ctrl_t ctrl, const char *userid)
|
||||
log_error (_("error writing '%s': %s\n"), fname, gpg_strerror (err));
|
||||
|
||||
leave:
|
||||
if (fp != es_stdout)
|
||||
es_fclose (fp);
|
||||
xfree (get_membuf (&mb, NULL));
|
||||
release_kbnode (keyblock);
|
||||
|
Loading…
x
Reference in New Issue
Block a user