Make the MALLOC_DEBUG output for free() useful again. After changing calls to
[asterisk/asterisk.git] / pbx / pbx_config.c
index 77862d0..449bf35 100644 (file)
@@ -1439,7 +1439,7 @@ static int pbx_load_config(const char *config_file)
                                                lastpri = ipri;
                                                if (!ast_opt_dont_warn && !strcmp(realext, "_."))
                                                        ast_log(LOG_WARNING, "The use of '_.' for an extension is strongly discouraged and can have unexpected behavior.  Please use '_X.' instead at line %d\n", v->lineno);
-                                               if (ast_add_extension2(con, 0, realext, ipri, label, cidmatch, appl, strdup(data), ast_free, registrar)) {
+                                               if (ast_add_extension2(con, 0, realext, ipri, label, cidmatch, appl, strdup(data), ast_free_ptr, registrar)) {
                                                        ast_log(LOG_WARNING, "Unable to register extension at line %d\n", v->lineno);
                                                }
                                        }
@@ -1567,9 +1567,9 @@ static void pbx_load_users(void)
                        /* If voicemail, use "stdexten" else use plain old dial */
                        if (hasvoicemail) {
                                snprintf(tmp, sizeof(tmp), "stdexten,%s,${HINT}", cat);
-                               ast_add_extension2(con, 0, cat, 1, NULL, NULL, "Macro", strdup(tmp), ast_free, registrar);
+                               ast_add_extension2(con, 0, cat, 1, NULL, NULL, "Macro", strdup(tmp), ast_free_ptr, registrar);
                        } else {
-                               ast_add_extension2(con, 0, cat, 1, NULL, NULL, "Dial", strdup("${HINT}"), ast_free, registrar);
+                               ast_add_extension2(con, 0, cat, 1, NULL, NULL, "Dial", strdup("${HINT}"), ast_free_ptr, registrar);
                        }
                }
        }