loader: strdup const string assigned to local variable name
There's a free(name) at the end of the function. GCC warned about this: ../hw/xfree86/loader/loadmod.c: In function ‘LoadModule’: ../hw/xfree86/loader/loadmod.c:702:18: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 702 | m = name = "int10"; | ^
This commit is contained in:
parent
e1fa3beb2f
commit
65387391a5
|
@ -699,7 +699,7 @@ LoadModule(const char *module, void *options, const XF86ModReqInfo *modreq,
|
|||
|
||||
/* Backward compatibility, vbe and int10 are merged into int10 now */
|
||||
if (!strcmp(m, "vbe"))
|
||||
m = name = "int10";
|
||||
m = name = strdup("int10");
|
||||
|
||||
for (cim = compiled_in_modules; *cim; cim++)
|
||||
if (!strcmp(m, *cim)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user