]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4004 --resolve
authorTravis Cross <tc@traviscross.com>
Wed, 14 Mar 2012 20:31:34 +0000 (20:31 +0000)
committerTravis Cross <tc@traviscross.com>
Wed, 14 Mar 2012 20:33:17 +0000 (20:33 +0000)
Thanks to Kyle A. King for pointing this out and to William King for
collaboration.

src/switch_loadable_module.c

index 36cc24b282cb67155780f285f4256b62816c498c..9474fee9b00b602685230bc172c5785e9ffde954 100644 (file)
@@ -1270,6 +1270,11 @@ static switch_status_t switch_loadable_module_load_file(char *path, char *filena
                        break;
                }
 
+               if (!module_interface) {
+                       err = "Module failed to initialize its module_interface. Is this a valid module?";
+                       break;
+               }
+
                if ((module = switch_core_alloc(pool, sizeof(switch_loadable_module_t))) == 0) {
                        err = "Could not allocate memory\n";
                        abort();