diff options
Diffstat (limited to 'funcs')
-rw-r--r-- | funcs/func_odbc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c index 55c06f4f6..7f2de02fc 100644 --- a/funcs/func_odbc.c +++ b/funcs/func_odbc.c @@ -502,8 +502,10 @@ static int acf_odbc_read(struct ast_channel *chan, const char *cmd, char *s, cha if (stmt) { break; } - ast_odbc_release_obj(obj); - obj = NULL; + if (obj) { + ast_odbc_release_obj(obj); + obj = NULL; + } } if (!stmt) { |