1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

common: Avoid double-free

* common/name-value.c (do_nvc_parse): reset to null after ownership
change

--

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
GnuPG-bug-id: 5393
This commit is contained in:
Jakub Jelen 2021-04-12 19:29:21 +02:00 committed by Werner Koch
parent 33a2362e56
commit 4704d1ce4e
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -724,6 +724,7 @@ do_nvc_parse (nvc_t *result, int *errlinep, estream_t stream,
if (raw_value)
{
err = _nvc_add (*result, name, NULL, raw_value, 1);
name = NULL;
if (err)
goto leave;
}