mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-18 14:17:03 +01:00
yat2m: don't dereference pointer to freed memory
* doc/yat2m.c (top_parse_file): Correct macrolist-freeing loop.
This commit is contained in:
parent
37801918cb
commit
4402dc3f0a
@ -1203,10 +1203,10 @@ top_parse_file (const char *fname, FILE *fp)
|
|||||||
if not in a section. */
|
if not in a section. */
|
||||||
while (macrolist)
|
while (macrolist)
|
||||||
{
|
{
|
||||||
macro_t m = macrolist->next;
|
macro_t next = macrolist->next;
|
||||||
free (m->value);
|
free (macrolist->value);
|
||||||
free (m);
|
free (macrolist);
|
||||||
macrolist = m;
|
macrolist = next;
|
||||||
}
|
}
|
||||||
|
|
||||||
parse_file (fname, fp, §ion_name, 0);
|
parse_file (fname, fp, §ion_name, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user