aboutsummaryrefslogtreecommitdiffstats
path: root/common/name-value.c
diff options
context:
space:
mode:
authorJakub Jelen <[email protected]>2021-04-13 05:54:53 +0000
committerNIIBE Yutaka <[email protected]>2021-04-13 05:57:51 +0000
commita16f726f9404f173705cc3bef71daee38d2c094b (patch)
treeb45f0906760d4ec471d121a925188fb1c50b606c /common/name-value.c
parentkbx: Fix memory leak. (diff)
downloadgnupg-a16f726f9404f173705cc3bef71daee38d2c094b.tar.gz
gnupg-a16f726f9404f173705cc3bef71daee38d2c094b.zip
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 <[email protected]>
Diffstat (limited to 'common/name-value.c')
-rw-r--r--common/name-value.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/name-value.c b/common/name-value.c
index f663ecfe1..0bd205b7d 100644
--- a/common/name-value.c
+++ b/common/name-value.c
@@ -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)
{