From: Russell Bryant Date: Tue, 24 Aug 2010 12:49:41 +0000 (+0000) Subject: Don't attempt to release a NULL ODBC handle. X-Git-Tag: 1.8.0-beta5~3^2~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9d1909c9b481735d6343152e75a1f2f09d49cb5c;p=thirdparty%2Fasterisk.git Don't attempt to release a NULL ODBC handle. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@283350 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c index 55c06f4f6f..7f2de02fcb 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) {