mirror of
https://github.com/AuxXxilium/kmod.git
synced 2024-12-22 06:27:58 +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;
|
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);
|
m = kmod_pool_get_module(ctx, name);
|
||||||
if (m != NULL) {
|
if (m != NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user