mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Return an error from hexfingerprint on malloc error.
* g10/keyid.c (hexfingerprint): Return NULL on malloc failure. Chnage all callers. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
29119a6492
commit
cd26c5482b
5 changed files with 92 additions and 33 deletions
15
g10/revoke.c
15
g10/revoke.c
|
@ -536,7 +536,20 @@ gen_standard_revoke (ctrl_t ctrl, PKT_public_key *psk, const char *cache_nonce)
|
|||
|
||||
dir = get_openpgp_revocdir (gnupg_homedir ());
|
||||
tmpstr = hexfingerprint (psk, NULL, 0);
|
||||
fname = xstrconcat (dir, DIRSEP_S, tmpstr, NULL);
|
||||
if (!tmpstr)
|
||||
{
|
||||
rc = gpg_error_from_syserror ();
|
||||
xfree (dir);
|
||||
return rc;
|
||||
}
|
||||
fname = strconcat (dir, DIRSEP_S, tmpstr, NULL);
|
||||
if (!fname)
|
||||
{
|
||||
rc = gpg_error_from_syserror ();
|
||||
xfree (tmpstr);
|
||||
xfree (dir);
|
||||
return rc;
|
||||
}
|
||||
xfree (tmpstr);
|
||||
xfree (dir);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue