[svn-commits] eliel: trunk r198437 - /trunk/res/res_timing_dahdi.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Sat May 30 20:22:19 CDT 2009
Author: eliel
Date: Sat May 30 20:22:15 2009
New Revision: 198437
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=198437
Log:
Avoid a crash when res_timing_dahdi is unloaded but wasn't properly loaded.
if dahdi_test_timer() fails, timing_funcs_handle remains NULL causing a crash
when calling ast_unregister_timing_interface() with a NULL pointer.
(closes issue #15234)
Reported by: eliel
Patches:
timing_dahdi1.diff uploaded by eliel (license 64)
Modified:
trunk/res/res_timing_dahdi.c
Modified: trunk/res/res_timing_dahdi.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/res/res_timing_dahdi.c?view=diff&rev=198437&r1=198436&r2=198437
==============================================================================
--- trunk/res/res_timing_dahdi.c (original)
+++ trunk/res/res_timing_dahdi.c Sat May 30 20:22:15 2009
@@ -192,7 +192,11 @@
static int unload_module(void)
{
- return ast_unregister_timing_interface(timing_funcs_handle);
+ if (timing_funcs_handle) {
+ return ast_unregister_timing_interface(timing_funcs_handle);
+ }
+
+ return 0;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "DAHDI Timing Interface");
More information about the svn-commits
mailing list