MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / free_map

Function free_map

tests/test_path_alias.c:74–87  ·  view source on GitHub ↗

The map produced by make_map() owns all heap memory the same way the * loader does, so the public free routine on the wrapping collection * works equivalently — but tests build naked maps, so use this helper. */

Source from the content-addressed store, hash-verified

72 * loader does, so the public free routine on the wrapping collection
73 * works equivalently — but tests build naked maps, so use this helper. */
74static void free_map(cbm_path_alias_map_t *map) {
75 if (!map) {
76 return;
77 }
78 for (int i = 0; i < map->count; i++) {
79 free(map->entries[i].alias_prefix);
80 free(map->entries[i].alias_suffix);
81 free(map->entries[i].target_prefix);
82 free(map->entries[i].target_suffix);
83 }
84 free(map->entries);
85 free(map->base_url);
86 free(map);
87}
88
89/* ── Basic wildcard alias ──────────────────────────────────────── */
90

Callers 1

test_path_alias.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected