summaryrefslogtreecommitdiffstats
path: root/scd/app-p15.c
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2024-07-15 20:26:41 +0200
committerNIIBE Yutaka <gniibe@fsij.org>2024-07-22 06:32:25 +0200
commitb1029031d473944063dd2fe22fcbe7202a76fb86 (patch)
tree54b3ede6fad178c57b3d036c44dd63fa2f31b6d6 /scd/app-p15.c
parenttools: Avoid memory leaks. (diff)
downloadgnupg2-b1029031d473944063dd2fe22fcbe7202a76fb86.tar.xz
gnupg2-b1029031d473944063dd2fe22fcbe7202a76fb86.zip
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>
Diffstat (limited to 'scd/app-p15.c')
-rw-r--r--scd/app-p15.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/scd/app-p15.c b/scd/app-p15.c
index 377cd5024..1eeae59af 100644
--- a/scd/app-p15.c
+++ b/scd/app-p15.c
@@ -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;