[asterisk-commits] mjordan: trunk r369392 - in /trunk: ./ main/adsi.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jun 26 08:23:15 CDT 2012
Author: mjordan
Date: Tue Jun 26 08:23:12 2012
New Revision: 369392
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=369392
Log:
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.
........
Merged revisions 369390 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 369391 from http://svn.asterisk.org/svn/asterisk/branches/10
Modified:
trunk/ (props changed)
trunk/main/adsi.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.
Modified: trunk/main/adsi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/adsi.c?view=diff&rev=369392&r1=369391&r2=369392
==============================================================================
--- trunk/main/adsi.c (original)
+++ trunk/main/adsi.c Tue Jun 26 08:23:12 2012
@@ -339,7 +339,7 @@
void ast_adsi_install_funcs(const struct adsi_funcs *funcs)
{
- if (funcs->version < current_adsi_version) {
+ if (funcs && funcs->version < current_adsi_version) {
ast_log(LOG_WARNING, "Cannot install ADSI function pointers due to version mismatch."
"Ours: %u, Theirs: %u\n", current_adsi_version, funcs->version);
return;
More information about the asterisk-commits
mailing list