Commit 65387391 authored by Michel Dänzer's avatar Michel Dänzer Committed by Peter Hutterer
Browse files

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";
      |                  ^
parent e1fa3beb
......@@ -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)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment