closes issue #11294; missed the conditional unlock of the contexts when the hash...
authorSteve Murphy <murf@digium.com>
Tue, 27 Nov 2007 22:14:55 +0000 (22:14 +0000)
committerSteve Murphy <murf@digium.com>
Tue, 27 Nov 2007 22:14:55 +0000 (22:14 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89792 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/pbx.c
pbx/pbx_config.c

index c23b211..b665e2c 100644 (file)
@@ -3604,7 +3604,8 @@ static struct ast_context *find_context_locked(const char *context)
                        return c;
        }
 #endif
                        return c;
        }
 #endif
-       ast_unlock_contexts();
+       if (!c)
+               ast_unlock_contexts();
 
        return c;
 }
 
        return c;
 }
index 8019c5c..5c97f8b 100644 (file)
@@ -1000,7 +1000,7 @@ static char *handle_cli_dialplan_add_extension(struct ast_cli_entry *e, int cmd,
        if (!app_data)
                app_data="";
        if (ast_add_extension(a->argv[5], a->argc == 7 ? 1 : 0, exten, iprior, NULL, cidmatch, app,
        if (!app_data)
                app_data="";
        if (ast_add_extension(a->argv[5], a->argc == 7 ? 1 : 0, exten, iprior, NULL, cidmatch, app,
-               (void *)strdup(app_data), ast_free, registrar)) {
+               (void *)strdup(app_data), ast_free_ptr, registrar)) {
                switch (errno) {
                case ENOMEM:
                        ast_cli(a->fd, "Out of free memory\n");
                switch (errno) {
                case ENOMEM:
                        ast_cli(a->fd, "Out of free memory\n");