Lines Matching refs:new_map
714 rule_map *new_map = NULL; in rule_map_new() local
722 new_map = calloc(1, (num_of_keys * sizeof(key_map)) + sizeof(rule_map)); in rule_map_new()
723 if (!new_map) in rule_map_new()
726 new_map->is_never_allow = is_never_allow; in rule_map_new()
727 new_map->length = num_of_keys; in rule_map_new()
728 new_map->lineno = lineno; in rule_map_new()
729 new_map->filename = strdup(filename); in rule_map_new()
730 if (!new_map->filename) { in rule_map_new()
737 r = &(new_map->m[i]); in rule_map_new()
766 if (!key_map_validate(r, filename, lineno, new_map->is_never_allow)) { in rule_map_new()
775 if (r->dir == dir_in || new_map->is_never_allow) { in rule_map_new()
779 int l = (new_map->key) ? strlen(new_map->key) : 0; in rule_map_new()
783 tmp = realloc(new_map->key, l); in rule_map_new()
787 if (!new_map->key) in rule_map_new()
790 new_map->key = tmp; in rule_map_new()
792 strncat(new_map->key, k->key, key_len); in rule_map_new()
793 strncat(new_map->key, k->value, val_len); in rule_map_new()
800 if (new_map->key == NULL) { in rule_map_new()
805 return new_map; in rule_map_new()
810 if(new_map) { in rule_map_new()
811 rule_map_free(new_map, false); in rule_map_new()