summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
Diffstat (limited to 'addons')
-rw-r--r--addons/res_config_mysql.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/addons/res_config_mysql.c b/addons/res_config_mysql.c
index f2ef949fc..b080d118b 100644
--- a/addons/res_config_mysql.c
+++ b/addons/res_config_mysql.c
@@ -523,9 +523,8 @@ static struct ast_config *realtime_multi_mysql(const char *database, const char
while ((row = mysql_fetch_row(result))) {
var = NULL;
- cat = ast_category_new("", "", -1);
+ cat = ast_category_new_anonymous();
if (!cat) {
- ast_log(LOG_WARNING, "Out of memory!\n");
continue;
}
for (i = 0; i < numFields; i++) {
@@ -934,8 +933,8 @@ static struct ast_config *config_mysql(const char *database, const char *table,
}
if (strcmp(last, row[0]) || last_cat_metric != atoi(row[3])) {
- if (!(cur_cat = ast_category_new(row[0], "", -1))) {
- ast_log(LOG_WARNING, "Out of memory!\n");
+ cur_cat = ast_category_new_dynamic(row[0]);
+ if (!cur_cat) {
break;
}
strcpy(last, row[0]);