diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-05-07 21:25:13 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-05-07 21:25:13 +0000 |
commit | edf0a80ec16429fc8c68fb809644733634698901 (patch) | |
tree | fa1a1802ae8485f117eca8ddbc63293c35529b97 | |
parent | 33abfe65bec2561125f887a2f8718cc465fa7fb9 (diff) |
Merged revisions 261917 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r261917 | tilghman | 2010-05-07 15:54:35 -0500 (Fri, 07 May 2010) | 8 lines
Double free crash
(closes issue #17245)
Reported by: thedavidfactor
Patches:
20100426__issue17245.diff.txt uploaded by tilghman (license 14)
Tested by: murraytm
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@261947 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | funcs/func_odbc.c | 9 |
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) { |