xfree86: loader: add assert() in LoadModule()
There's (remote) chance that the (internal) module name could become NULL (eg. allocation failure). Even though chances to hit it are very low, it's still better to have a check here (that doesn't cost us much), just in case. Assert fail is still better than segfault, since we're at least getting some hint what might have happened. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
b28285332e
commit
7ae09df3ae
|
@ -702,6 +702,8 @@ LoadModule(const char *module, void *options, const XF86ModReqInfo *modreq,
|
|||
if (!strcmp(m, "vbe"))
|
||||
m = name = strdup("int10");
|
||||
|
||||
assert(m);
|
||||
|
||||
for (cim = compiled_in_modules; *cim; cim++)
|
||||
if (!strcmp(m, *cim)) {
|
||||
LogMessageVerb(X_INFO, 3, "Module \"%s\" already built-in\n", m);
|
||||
|
|
Loading…
Reference in New Issue