]> git.ipfire.org Git - thirdparty/asterisk.git/commit
MALLOC_DEBUG: Fix some misuses of free() when MALLOC_DEBUG is enabled.
authorRichard Mudgett <rmudgett@digium.com>
Wed, 2 Oct 2013 17:11:42 +0000 (17:11 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 2 Oct 2013 17:11:42 +0000 (17:11 +0000)
commit1a7783c7f83847d5d18178fe9bd07f1958bd7413
treea4472543ce5344a0dce1a59c465874b1c1b38a07
parentc114871a684e2c5cd1c2f9a79a9b532272947e56
MALLOC_DEBUG: Fix some misuses of free() when MALLOC_DEBUG is enabled.

* There were several places in ARI where an external library was mallocing
memory that must always be released with free().  When MALLOC_DEBUG is
enabled, free() is redirected to the MALLOC_DEBUG version.  Since the
external library call still uses the normal malloc(), MALLOC_DEBUG
complains that the freed memory block is not registered and will not free
it.  These cases must use ast_std_free().

* Changed calls to asprintf() and vasprintf() to the equivalent
ast_asprintf() and ast_vasprintf() versions respectively.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
apps/app_stack.c
main/json.c
main/stasis_cache.c
main/utils.c
res/res_ari.c
res/stasis_recording/stored.c