pinentry/pinentry-1.1.1-coverity.patch
2021-08-26 09:00:30 +02:00

30 lines
1010 B
Diff

commit a87d9e8f89f946a733c756c72bf5ec41e0a738b8
Author: Jakub Jelen <jjelen@redhat.com>
Date: Wed Apr 14 15:51:27 2021 +0900
core,emacs,tty,curses: Fix memory leaks, invalid accese, and mistake.
* pinentry/pinentry-curses.c (dialog_create): Free NEW.
[HAVE_NCURSESW] (dialog_run): Free OLD_CTYPE on error.
* pinentry/pinentry.c (pinentry_inq_genpin): Free VALUE on error.
* tty/pinentry-tty.c (tty_cmd_handler): Don't access closed FDs.
* pinentry/pinentry-emacs.c (set_labels): Fix for ->default_cancel.
--
GnuPG-bug-id: 5384
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
diff --git a/pinentry/pinentry.c b/pinentry/pinentry.c
index ef81f12..26ec77a 100644
--- a/pinentry/pinentry.c
+++ b/pinentry/pinentry.c
@@ -656,6 +656,7 @@ pinentry_inq_genpin (pinentry_t pin)
if (rc)
{
fprintf (stderr, "ASSUAN READ LINE failed: rc=%d\n", rc);
+ free (value);
return 0;
}
}