Browse Source

cfgutils: init probability pointer to NULL

- otherwise it can be an attempt to free it when the kamailio does not
  start due to config errors
- reported by Dragos Oancea
Daniel-Constantin Mierla 12 năm trước cách đây
mục cha
commit
ac5835c0af
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      modules/cfgutils/cfgutils.c

+ 1 - 1
modules/cfgutils/cfgutils.c

@@ -131,7 +131,7 @@ static int mod_init(void);
 static void mod_destroy(void);
 
 static int initial_prob = 10;
-static int *probability;
+static int *probability = NULL;
 
 static char config_hash[MD5_LEN];
 static char* hash_file = NULL;