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

Function cbm_gitignore_free

src/discover/gitignore.c:404–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402}
403
404void cbm_gitignore_free(cbm_gitignore_t *gi) {
405 if (!gi) {
406 return;
407 }
408 for (int i = 0; i < gi->count; i++) {
409 free(gi->patterns[i].pattern);
410 }
411 free(gi->patterns);
412 free(gi);
413}
414
415/* Test seam: lets a unit test simulate strdup() failure mid-merge so the
416 * atomic-rollback path can be exercised without real OOM. NULL = use strdup. */

Callers 4

walk_dirFunction · 0.85
discover_implFunction · 0.85
test_gitignore.cFile · 0.85
repro_issue510.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected