[asterisk-bugs] [Asterisk 0016257]: [patch] Memory leak in res_config_ldap when using realtime extensions
Asterisk Bug Tracker
noreply at bugs.digium.com
Thu Jan 14 17:18:37 CST 2010
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=16257
======================================================================
Reported By: nito
Assigned To: seanbright
======================================================================
Project: Asterisk
Issue ID: 16257
Category: Resources/res_config_ldap
Reproducibility: always
Severity: major
Priority: normal
Status: closed
Asterisk Version: 1.6.0.17
JIRA:
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 2009-11-16 17:32 CST
Last Modified: 2010-01-14 17:18 CST
======================================================================
Summary: [patch] Memory leak in res_config_ldap when using
realtime extensions
Description:
When using realtime extensions we get a memory leak.
Configuration line
./configure --prefix=/usr/local/asterisk-1.6.0.17 --disable-xmldoc
--sysconfdir=/etc --localstatedir=/var --with-netsnmp
we also tried with make menuconfig selecting dontoptimize and
debug_malloc.
Running with valgrind we get:
--20782-- Command line
--20782-- /usr/local/asterisk/sbin/asterisk
--20782-- -vvvvddddddddcg
--20782-- Startup, with flags:
--20782-- -v
--20782-- --log-file=/tmp/valgrind-1.6.0.17.dontoptimze.out
--20782-- --leak-check=full
--20782-- --trace-children=yes
--20782-- --show-reachable=yes
--20782-- --leak-resolution=high
--20782-- --num-callers=50
and
==20782== 7,307,920 bytes in 30,632 blocks are still reachable in loss
record 2,
151 of 2,151
==20782== at 0x4C278AE: malloc (vg_replace_malloc.c:207)
==20782== by 0x43E825: __ast_alloc_region (astmm.c:114)
==20782== by 0x43E7C4: __ast_calloc (astmm.c:203)
==20782== by 0x4672D8: ast_variable_new (config.c:214)
==20782== by 0x919D92C: realtime_ldap_entry_to_var
(res_config_ldap.c:323)
==20782== by 0x919DA71: realtime_ldap_result_to_vars
(res_config_ldap.c:367)
==20782== by 0x919F82E: realtime_ldap_base_ap (res_config_ldap.c:817)
==20782== by 0x919FBCB: realtime_ldap (res_config_ldap.c:902)
==20782== by 0x46D624: ast_load_realtime_helper (config.c:2045)
==20782== by 0x46D826: ast_load_realtime (config.c:2068)
==20782== by 0x165824D2: realtime_switch_common (pbx_realtime.c:93)
==20782== by 0x16582841: realtime_common (pbx_realtime.c:140)
==20782== by 0x16582898: realtime_exists (pbx_realtime.c:147)
==20782== by 0x4BB552: pbx_find_extension (pbx.c:2264)
==20782== by 0x4BE1D9: pbx_extension_helper (pbx.c:3072)
==20782== by 0x4BF8A4: ast_exists_extension (pbx.c:3559)
==20782== by 0x10FA763D: get_destination (chan_sip.c:11474)
==20782== by 0x10FC7DC9: handle_request_invite (chan_sip.c:17655)
==20782== by 0x10FCF1A2: handle_incoming (chan_sip.c:19190)
==20782== by 0x10FD0061: handle_request_do (chan_sip.c:19464)
==20782== by 0x10FCFA94: sipsock_read (chan_sip.c:19370)
==20782== by 0x49FCDE: ast_io_wait (io.c:288)
==20782== by 0x10FD130A: do_monitor (chan_sip.c:19865)
==20782== by 0x51409A: dummy_start (utils.c:861)
==20782== by 0x59813B9: start_thread (in /lib/libpthread-2.9.so)
==20782== by 0x54E9FCC: clone (in /lib/libc-2.9.so)
======================================================================
----------------------------------------------------------------------
(0116697) svnbot (reporter) - 2010-01-14 17:18
https://issues.asterisk.org/view.php?id=16257#c116697
----------------------------------------------------------------------
Repository: asterisk
Revision: 240279
_U branches/1.6.1/
U branches/1.6.1/res/res_config_ldap.c
------------------------------------------------------------------------
r240279 | seanbright | 2010-01-14 17:18:37 -0600 (Thu, 14 Jan 2010) | 14
lines
Merged revisions 240271 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r240271 | seanbright | 2010-01-14 18:13:02 -0500 (Thu, 14 Jan 2010) | 7
lines
Plug a memory leak in res_config_ldap.
(closes issue https://issues.asterisk.org/view.php?id=16257)
Reported by: nito
Patches:
issue16257_20100111.diff uploaded by seanbright (license 71)
........
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=240279
Issue History
Date Modified Username Field Change
======================================================================
2010-01-14 17:18 svnbot Checkin
2010-01-14 17:18 svnbot Note Added: 0116697
======================================================================
More information about the asterisk-bugs
mailing list