sync with OpenBSD -current

This commit is contained in:
purplerain 2025-01-10 01:40:29 +00:00
parent 4b49aefbb1
commit 1fd36b57f8
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
945 changed files with 81965 additions and 59988 deletions

View file

@ -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));
}