summaryrefslogtreecommitdiffstats
path: root/tools/gpg-card.c
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2021-04-13 14:50:13 +0200
committerWerner Koch <wk@gnupg.org>2021-05-20 14:49:02 +0200
commit98c52aeb31f4bf2604727aacad982fb51c04063f (patch)
tree3c494a30865fdf141d17b061d740ee82e956fd95 /tools/gpg-card.c
parentscd: avoid memory leaks (diff)
downloadgnupg2-98c52aeb31f4bf2604727aacad982fb51c04063f.tar.xz
gnupg2-98c52aeb31f4bf2604727aacad982fb51c04063f.zip
card: Intialize pointer to avoid double free
* tools/gpg-card.c (cmd_salut): Initialize data pointer -- Signed-off-by: Jakub Jelen <jjelen@redhat.com> GnuPG-bug-id: 5393
Diffstat (limited to '')
-rw-r--r--tools/gpg-card.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/gpg-card.c b/tools/gpg-card.c
index 1889fb45c..e84d2fbb0 100644
--- a/tools/gpg-card.c
+++ b/tools/gpg-card.c
@@ -1785,6 +1785,7 @@ cmd_salut (card_info_t info, const char *argstr)
{
tty_printf (_("Error: invalid response.\n"));
xfree (data);
+ data = NULL;
goto again;
}
}