libkmod-module: Don't pass NULL ctx to kmod_log

This commit is contained in:
Lucas De Marchi 2013-04-23 20:47:28 -03:00
parent 818af4f6fa
commit b9a7da3910

View File

@ -1839,7 +1839,7 @@ KMOD_EXPORT struct kmod_list *kmod_module_get_holders(const struct kmod_module *
struct kmod_list *list = NULL;
DIR *d;
if (mod == NULL)
if (mod == NULL || mod->ctx == NULL)
return NULL;
snprintf(dname, sizeof(dname), "/sys/module/%s/holders", mod->name);