1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

scd: Avoid memory leak.

* scd/app-p15.c (do_sign): Free allocated memory on error.

--

GnuPG-bug-id: 7201
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Jakub Jelen 2024-07-15 20:26:41 +02:00 committed by NIIBE Yutaka
parent e8c8068dec
commit b1029031d4
No known key found for this signature in database
GPG Key ID: 640114AF89DE6054

View File

@ -5742,6 +5742,7 @@ do_sign (app_t app, ctrl_t ctrl, const char *keyidstr, int hashalgo,
log_error ("p15: non-matching input data for Starcos:"
" hash=%d len=%zu\n", hashalgo, indatalen);
err = gpg_error (GPG_ERR_INV_VALUE);
xfree (frame);
goto leave;
}
framelen = indatalen - oidbuflen;