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
|
|
@ -265,6 +265,7 @@ int xcecd_join_cluster(hostattrs_t* attrs)
|
|||
XCECD_LOG(XCE_LOG_WARN,
|
||||
"xcecd_join_cluster: connect to %s:%d failed (rc=%d)",
|
||||
host, port, rc);
|
||||
xcecli_ctx_fini(xcecli_ctx); /* free context before next attempt */
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -282,6 +283,7 @@ int xcecd_join_cluster(hostattrs_t* attrs)
|
|||
"(likely standby redirect), trying next",
|
||||
host, port, rc);
|
||||
xcecli_stop(xcecli_ctx);
|
||||
xcecli_ctx_fini(xcecli_ctx); /* free context before next attempt */
|
||||
}
|
||||
|
||||
XCECD_LOG(XCE_LOG_ERROR,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue