]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
libkmod-module: Don't pass NULL ctx to kmod_log
authorLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 23 Apr 2013 23:47:28 +0000 (20:47 -0300)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Wed, 24 Apr 2013 00:26:08 +0000 (21:26 -0300)
libkmod/libkmod-module.c

index 6b793cd6a56395a18b48690becae3fe9f14fbf6e..1f8ce3c2cb8701fe8627e103ecd0e5ff2f4c4f29 100644 (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);