diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2024-11-05 08:13:07 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2024-11-05 08:13:07 +0000 |
commit | 3ced31dfa7da11653ae880c2776cbf2e2256a009 (patch) | |
tree | 981ca5d9ba5a6d1f1cf8b8685faf120dd8c5c96c /xserver/hw/xfree86/parser/Module.c | |
parent | 939fde46a015afeec2b96b5cb6d0cc8aefe54c3d (diff) |
Update to xserver 21.1.14. tested by tb@
The xkb security fix was committed earlier. This is the rest of the
21.1.14 update.
Diffstat (limited to 'xserver/hw/xfree86/parser/Module.c')
-rw-r--r-- | xserver/hw/xfree86/parser/Module.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/xserver/hw/xfree86/parser/Module.c b/xserver/hw/xfree86/parser/Module.c index 38bf777ed..9a166aff2 100644 --- a/xserver/hw/xfree86/parser/Module.c +++ b/xserver/hw/xfree86/parser/Module.c @@ -95,6 +95,8 @@ xf86parseModuleSubSection(XF86LoadPtr head, char *name) switch (token) { case COMMENT: ptr->load_comment = xf86addComment(ptr->load_comment, xf86_lex_val.str); + free(xf86_lex_val.str); + xf86_lex_val.str = NULL; break; case OPTION: ptr->load_opt = xf86parseOption(ptr->load_opt); @@ -126,6 +128,8 @@ xf86parseModuleSection(void) switch (token) { case COMMENT: ptr->mod_comment = xf86addComment(ptr->mod_comment, xf86_lex_val.str); + free(xf86_lex_val.str); + xf86_lex_val.str = NULL; break; case LOAD: if (xf86getSubToken(&(ptr->mod_comment)) != STRING) @@ -230,10 +234,13 @@ xf86addNewLoadDirective(XF86LoadPtr head, const char *name, int type, new->ignore = 0; new->list.next = NULL; - if ((token = xf86getToken(NULL)) == COMMENT) + if ((token = xf86getToken(NULL)) == COMMENT) { new->load_comment = xf86addComment(new->load_comment, xf86_lex_val.str); - else + free(xf86_lex_val.str); + xf86_lex_val.str = NULL; + } else { xf86unGetToken(token); + } return ((XF86LoadPtr) xf86addListItem((glp) head, (glp) new)); } |