fix: add xcecli_ctx_fini() before continue in HA candidate loop (resource leak)
This commit is contained in:
parent
b75703ba6b
commit
9bc84f1ca1
2 changed files with 5 additions and 1 deletions
|
|
@ -445,6 +445,7 @@ int sched_init(xce_scheduler_t* sched, xce_client_config_t* config,
|
|||
|
||||
rc = xcecli_start(sched->apictx);
|
||||
if (rc < 0) {
|
||||
xcecli_ctx_fini(sched->apictx); /* free before next attempt */
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -454,8 +455,9 @@ int sched_init(xce_scheduler_t* sched, xce_client_config_t* config,
|
|||
break;
|
||||
}
|
||||
|
||||
/* Standby replied — try next candidate */
|
||||
/* Standby replied — tear down fully before next attempt */
|
||||
xcecli_stop(sched->apictx);
|
||||
xcecli_ctx_fini(sched->apictx);
|
||||
}
|
||||
|
||||
if (!joined) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue