1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

common: Fix memory leaks.

* common/name-value.c (do_nvc_parse): Free NAME.
* common/recsel.c (recsel_parse_expr): Release SE_HEAD and EXPR_BUFFER.

--

GnuPG-bug-id: 5393
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Jakub Jelen 2021-04-13 14:54:53 +09:00 committed by NIIBE Yutaka
parent 51bbd99a3c
commit a16f726f94
2 changed files with 12 additions and 2 deletions

View file

@ -777,9 +777,13 @@ do_nvc_parse (nvc_t *result, int *errlinep, estream_t stream,
/* Add the final entry. */
if (raw_value)
err = _nvc_add (*result, name, NULL, raw_value, 1);
{
err = _nvc_add (*result, name, NULL, raw_value, 1);
name = NULL;
}
leave:
xfree (name);
gpgrt_free (buf);
if (err)
{