aboutsummaryrefslogtreecommitdiffstats
path: root/funcs/func_odbc.c
diff options
context:
space:
mode:
Diffstat (limited to 'funcs/func_odbc.c')
-rw-r--r--funcs/func_odbc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c
index a72460041..5bb66c38b 100644
--- a/funcs/func_odbc.c
+++ b/funcs/func_odbc.c
@@ -321,6 +321,7 @@ static int acf_odbc_write(struct ast_channel *chan, const char *cmd, char *s, co
if (obj && !transactional) {
ast_odbc_release_obj(obj);
+ obj = NULL;
}
}
@@ -339,6 +340,10 @@ static int acf_odbc_write(struct ast_channel *chan, const char *cmd, char *s, co
SQLRowCount(stmt, &rows);
break;
}
+ if (obj) {
+ ast_odbc_release_obj(obj);
+ obj = NULL;
+ }
}
} else if (stmt) {
status = "SUCCESS";
@@ -460,6 +465,10 @@ static int acf_odbc_read(struct ast_channel *chan, const char *cmd, char *s, cha
if (stmt) {
break;
}
+ if (obj) {
+ ast_odbc_release_obj(obj);
+ obj = NULL;
+ }
}
if (!stmt) {