| 328 | } |
| 329 | |
| 330 | static void main_local_cli_mutation_end(void *context, const char *project) { |
| 331 | main_local_cli_mutation_t *mutation = context; |
| 332 | if (!mutation || !project) { |
| 333 | return; |
| 334 | } |
| 335 | main_local_cli_lease_t **cursor = &mutation->leases; |
| 336 | while (*cursor && strcmp((*cursor)->project, project) != 0) { |
| 337 | cursor = &(*cursor)->next; |
| 338 | } |
| 339 | main_local_cli_lease_t *held = *cursor; |
| 340 | if (held) { |
| 341 | *cursor = held->next; |
| 342 | main_project_lock_release_fully(&held->lease); |
| 343 | free(held->project); |
| 344 | free(held); |
| 345 | } |
| 346 | } |
| 347 | |
| 348 | static void main_local_cli_mutation_release_all(main_local_cli_mutation_t *mutation) { |
| 349 | while (mutation && mutation->leases) { |
nothing calls this directly
no test coverage detected