Browse Source

modules_k/permisssions Fixed a bug that caused a segmentation fault if the mi_fifo subnet_dump was issued
but the permissions module was not fully configured (no db url given)
(cherry picked from commit d5da961b7ac62037fb1fb24c6ce3484584f5f972)

Marius Zbihlei 15 năm trước cách đây
mục cha
commit
d4d88bef1c
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      modules_k/permissions/mi.c

+ 1 - 1
modules_k/permissions/mi.c

@@ -116,7 +116,7 @@ struct mi_root* mi_subnet_dump(struct mi_root *cmd_tree, void *param)
     rpl_tree = init_mi_tree( 200, MI_SSTR(MI_OK));
     if (rpl_tree==NULL) return 0;
     
-    if(subnet_table_mi_print(*subnet_table, &rpl_tree->node) <  0) {
+    if(subnet_table && subnet_table_mi_print(*subnet_table, &rpl_tree->node) <  0) {
 	LM_ERR("failed to add a node\n");
 	free_mi_tree(rpl_tree);
 	return 0;