Ver Fonte

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)

Marius Zbihlei há 15 anos atrás
pai
commit
d5da961b7a
1 ficheiros alterados com 1 adições e 1 exclusões
  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;