| 337 | } |
| 338 | |
| 339 | static void main_local_cli_mutation_end(void *context, const char *project) { |
| 340 | main_local_cli_mutation_t *mutation = context; |
| 341 | if (!mutation || !project) { |
| 342 | return; |
| 343 | } |
| 344 | main_local_cli_lease_t **cursor = &mutation->leases; |
| 345 | while (*cursor && strcmp((*cursor)->project, project) != 0) { |
| 346 | cursor = &(*cursor)->next; |
| 347 | } |
| 348 | main_local_cli_lease_t *held = *cursor; |
| 349 | if (held) { |
| 350 | *cursor = held->next; |
| 351 | main_project_lock_release_fully(&held->lease); |
| 352 | free(held->project); |
| 353 | free(held); |
| 354 | } |
| 355 | } |
| 356 | |
| 357 | static void main_local_cli_mutation_release_all(main_local_cli_mutation_t *mutation) { |
| 358 | while (mutation && mutation->leases) { |
nothing calls this directly
no test coverage detected