summaryrefslogtreecommitdiffstats
path: root/scd/app-nks.c
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2021-04-13 07:21:29 +0200
committerNIIBE Yutaka <gniibe@fsij.org>2021-04-13 07:21:29 +0200
commit7cbe29c4fb4f593e194b6c25cb31633b4a6e0b2b (patch)
treec9e227fea15a5f08a6c6662dea052ee9611aaf39 /scd/app-nks.c
parentagent,kbx: Add LIBASSUAN_CLFAGS. (diff)
downloadgnupg2-7cbe29c4fb4f593e194b6c25cb31633b4a6e0b2b.tar.xz
gnupg2-7cbe29c4fb4f593e194b6c25cb31633b4a6e0b2b.zip
scd: Fix memory leaks.
* scd/apdu.c (apdu_dev_list_start): Free DL. * scd/app-nks.c (pubkey_from_pk_file): Fix typo in condition. -- GnuPG-bug-id: 5393 Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Diffstat (limited to 'scd/app-nks.c')
-rw-r--r--scd/app-nks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scd/app-nks.c b/scd/app-nks.c
index bf2ad51b7..31b91ac93 100644
--- a/scd/app-nks.c
+++ b/scd/app-nks.c
@@ -372,7 +372,7 @@ pubkey_from_pk_file (app_t app, int pkfid, int cfid,
newlen = 1 + buflen[i] - offset[i];
newbuf = xtrymalloc (newlen);
- if (!newlen)
+ if (!newbuf)
{
err = gpg_error_from_syserror ();
xfree (buffer[0]);