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

Function free_map

tests/test_path_alias.c:75–88  ·  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

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

Callers 1

test_path_alias.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected