| 402 | } |
| 403 | |
| 404 | void 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. */ |
no outgoing calls
no test coverage detected