Module: kamailio Branch: master Commit: c87a75c5fb7aa5d940093fbbca8d9557cc9a0239 URL: https://github.com/kamailio/kamailio/commit/c87a75c5fb7aa5d940093fbbca8d9557...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2015-01-23T10:55:15+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
---
Modified: modules/pike/pike_funcs.c
---
Diff: https://github.com/kamailio/kamailio/commit/c87a75c5fb7aa5d940093fbbca8d9557... Patch: https://github.com/kamailio/kamailio/commit/c87a75c5fb7aa5d940093fbbca8d9557...
---
diff --git a/modules/pike/pike_funcs.c b/modules/pike/pike_funcs.c index 83b565a..a0b964f 100644 --- a/modules/pike/pike_funcs.c +++ b/modules/pike/pike_funcs.c @@ -172,7 +172,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 );