Summary: | ASTERISK-12552: [PATCH] ODBC database handles allocated but never released | ||
Reporter: | Daniel A. Veiga (dveiga) | Labels: | |
Date Opened: | 2008-08-10 14:40:59 | Date Closed: | 2008-08-10 19:12:14 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Resources/res_odbc |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | Database handles are allocated but never released. Simple check: SQLFreeHandle() es never called with handle type SQL_HANDLE_DBC in res_odbc.c. When res_odbc is used with "idlecheck" param, system resources are consumed untill a fatal failure occurs. As a new SQL_HANDLE_DBC handle is always allocated in odbc_obj_connect(), the patch releases the previous one in odbc_obj_disconnect(). ****** ADDITIONAL INFORMATION ****** code as attachments only | ||
Comments: | By: snuffy (snuffy) 2008-08-10 16:06:43 please upload code as an attachment not inside issue By: Digium Subversion (svnbot) 2008-08-10 19:12:12 Repository: asterisk Revision: 137138 U branches/1.4/res/res_odbc.c ------------------------------------------------------------------------ r137138 | tilghman | 2008-08-10 19:12:10 -0500 (Sun, 10 Aug 2008) | 5 lines Deallocate database connection handle on disconnect, as we allocate another one on connect. (closes issue ASTERISK-12552) Reported by: dveiga ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=137138 |