]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Fix crash in unloading of res_adsi module
authorMatthew Jordan <mjordan@digium.com>
Tue, 26 Jun 2012 13:21:13 +0000 (13:21 +0000)
committerMatthew Jordan <mjordan@digium.com>
Tue, 26 Jun 2012 13:21:13 +0000 (13:21 +0000)
commit02fb0d8d28c123a9b998f78a77d0e33d30a80f2c
tree5cd7c71362a25318a8ec6e03c5e1bd9374f72635
parent5a77cbe00c4cc2fa10218c454ebb1f05a1f7ae90
Fix crash in unloading of res_adsi module

When res_adsi is unloaded, it removes the ADSI functions that it previously installed
by passing a NULL adsi_funcs pointer to ast_adsi_install_funcs.  This function was not
checking whether or not the adsi_funcs pointer passed in was NULL before dereferencing
it to check whether or not the version of the functions matches what the core was
expecting it.

This patch makes it so that the version is only checked if a potentially valid adsi_funcs
pointer was passed in.  Passing in NULL removes the installed functions, bypassing the
version check.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@369390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/adsi.c