Skip to content

Fix a double-free on syntax error without a new line.

Matthieu Herrb requested to merge mherrb/xserver:parser-fix into master

$ echo "#foo\nfoo" > custom_config $ X -config custom_config

will trigger the double free because the contents of xf86_lex_val.str have been realloc()ed aready when free is called in read.c:209.

This invalidates the pointer so that it doesn't get free()d a second time.

Merge request reports