mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-25 08:29:23 +00:00
xfree86: parser: use standard asprintf() instead of our own implementation
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
61aa2ede91
commit
1dcbc67379
@@ -121,8 +121,9 @@ xf86parseOutputClassSection(void)
|
||||
if (xf86getSubToken(&(ptr->comment)) != XF86_TOKEN_STRING)
|
||||
Error(QUOTE_MSG, "ModulePath");
|
||||
if (ptr->modulepath) {
|
||||
char *path;
|
||||
XNFasprintf(&path, "%s,%s", ptr->modulepath, xf86_lex_val.str);
|
||||
char *path = NULL;
|
||||
if (asprintf(&path, "%s,%s", ptr->modulepath, xf86_lex_val.str) == -1)
|
||||
FatalError("xf86parseOutputClassSection() malloc failed\n");
|
||||
free(xf86_lex_val.str);
|
||||
free(ptr->modulepath);
|
||||
ptr->modulepath = path;
|
||||
|
||||
Reference in New Issue
Block a user