res_pjsip_pubsub.c: Add missing error return in load_module().
authorRichard Mudgett <rmudgett@digium.com>
Fri, 21 Aug 2015 16:04:08 +0000 (11:04 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 10 Sep 2015 18:16:12 +0000 (13:16 -0500)
Change-Id: I15debd0f717f16ee2f78e7f56151c3b3b97b72fc

res/res_pjsip_pubsub.c

index 6c3d101..c46bbfc 100644 (file)
@@ -4270,6 +4270,7 @@ static int load_module(void)
        if (apply_list_configuration(sorcery)) {
                ast_sip_unregister_service(&pubsub_module);
                ast_sched_context_destroy(sched);
        if (apply_list_configuration(sorcery)) {
                ast_sip_unregister_service(&pubsub_module);
                ast_sched_context_destroy(sched);
+               return AST_MODULE_LOAD_FAILURE;
        }
 
        ast_sorcery_apply_default(sorcery, "inbound-publication", "config", "pjsip.conf,criteria=type=inbound-publication");
        }
 
        ast_sorcery_apply_default(sorcery, "inbound-publication", "config", "pjsip.conf,criteria=type=inbound-publication");