mirror of
https://github.com/AuxXxilium/kmod.git
synced 2024-12-21 14:11:17 +07:00
handle case where modname was not detected.
This commit is contained in:
parent
cb451f35d9
commit
973c80ba7c
@ -248,7 +248,10 @@ KMOD_EXPORT int kmod_module_new_from_path(struct kmod_ctx *ctx,
|
||||
return -errno;
|
||||
}
|
||||
|
||||
path_to_modname(path, name, &namelen);
|
||||
if (path_to_modname(path, name, &namelen) == NULL) {
|
||||
free(abspath);
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
m = kmod_pool_get_module(ctx, name);
|
||||
if (m != NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user