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:
Enrico Weigelt, metux IT consult
2025-11-06 16:16:11 +01:00
committed by Enrico Weigelt
parent 61aa2ede91
commit 1dcbc67379

View File

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