| 374 | } |
| 375 | |
| 376 | static void main_local_cli_mutation_end(void *context, const char *project) { |
| 377 | main_local_cli_mutation_t *mutation = context; |
| 378 | if (!mutation || !project) { |
| 379 | return; |
| 380 | } |
| 381 | main_local_cli_lease_t **cursor = &mutation->leases; |
| 382 | while (*cursor && strcmp((*cursor)->project, project) != 0) { |
| 383 | cursor = &(*cursor)->next; |
| 384 | } |
| 385 | main_local_cli_lease_t *held = *cursor; |
| 386 | if (held) { |
| 387 | *cursor = held->next; |
| 388 | main_project_lock_release_fully(&held->lease); |
| 389 | free(held->project); |
| 390 | free(held); |
| 391 | } |
| 392 | } |
| 393 | |
| 394 | static void main_local_cli_mutation_release_all(main_local_cli_mutation_t *mutation) { |
| 395 | while (mutation && mutation->leases) { |
nothing calls this directly
no test coverage detected