Module: kamailio Branch: 4.2 Commit: 688593f15e2a67dfaf00d3b371633b3f93e3d584 URL: https://github.com/kamailio/kamailio/commit/688593f15e2a67dfaf00d3b371633b3f...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2015-01-28T13:39:36+01:00
pike: check that timer var is initialized before accessing the fields
- safe start with empty config, reported by Olle E. Johansson, GH#39
(cherry picked from commit c87a75c5fb7aa5d940093fbbca8d9557cc9a0239)
---
Modified: modules/pike/pike_funcs.c
---
Diff: https://github.com/kamailio/kamailio/commit/688593f15e2a67dfaf00d3b371633b3f... Patch: https://github.com/kamailio/kamailio/commit/688593f15e2a67dfaf00d3b371633b3f...
---
diff --git a/modules/pike/pike_funcs.c b/modules/pike/pike_funcs.c index e159a27..0e1a9e1 100644 --- a/modules/pike/pike_funcs.c +++ b/modules/pike/pike_funcs.c @@ -184,7 +184,7 @@ void clean_routine(unsigned int ticks , void *param) /* LM_DBG("entering (%d)\n",ticks); */ /* before locking check first if the list is not empty and if can * be at least one element removed */ - if ( is_list_empty( timer )) return; /* quick exit */ + if (timer==0 || is_list_empty( timer )) return; /* quick exit */
/* get the expired elements */ lock_get( timer_lock );