Index: apps/app_queue.c =================================================================== --- apps/app_queue.c (revision 90000) +++ apps/app_queue.c (working copy) @@ -1362,6 +1362,7 @@ member_config = ast_load_realtime_multientry("queue_members", "interface LIKE", "%", "queue_name", queuename, NULL); if (!member_config) { ast_log(LOG_ERROR, "no queue_members defined in your config (extconfig.conf).\n"); + ast_variables_destroy(queue_vars); return NULL; } } Index: res/res_musiconhold.c =================================================================== --- res/res_musiconhold.c (revision 90000) +++ res/res_musiconhold.c (working copy) @@ -1108,6 +1108,7 @@ } } } + ast_variables_destroy(var); if (ast_strlen_zero(mohclass->dir)) { if (!strcasecmp(mohclass->mode, "custom")) { strcpy(mohclass->dir, "nodir"); @@ -1206,7 +1207,8 @@ } - } + } else if (var) + ast_variables_destroy(var); }