aboutsummaryrefslogtreecommitdiffstats
path: root/funcs
diff options
context:
space:
mode:
Diffstat (limited to 'funcs')
-rw-r--r--funcs/func_odbc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c
index d25a7e93c..cc344be41 100644
--- a/funcs/func_odbc.c
+++ b/funcs/func_odbc.c
@@ -277,6 +277,8 @@ static int acf_odbc_read(struct ast_channel *chan, const char *cmd, char *s, cha
return -1;
}
+ ast_str_reset(colnames);
+
AST_RWLIST_RDLOCK(&queries);
AST_RWLIST_TRAVERSE(&queries, query, list) {
if (!strcmp(query->acf->name, cmd)) {
@@ -420,6 +422,7 @@ static int acf_odbc_read(struct ast_channel *chan, const char *cmd, char *s, cha
colnames->str[colnames->used++] = colname[i];
if (colname[i] == '\0') {
+ colnames->used--;
break;
}
}