<div dir="ltr">Thanks for the patch. Could you send it to GitHub so that it can be reviewed and merged using the regular procedure ?<div><br></div><div>You can find more information about contributing to the project here: <a href="https://docs.gluster.org/en/latest/Developer-guide/Developers-Index/">https://docs.gluster.org/en/latest/Developer-guide/Developers-Index/</a></div><div><br></div><div>Xavi</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 16, 2021 at 10:43 AM <<a href="mailto:qiang.zhang@windriver.com">qiang.zhang@windriver.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From: Zqiang <<a href="mailto:qiang.zhang@windriver.com" target="_blank">qiang.zhang@windriver.com</a>><br>
<br>
If create timer thread failed, the 'ctx->timer' need<br>
to be released.<br>
<br>
Signed-off-by: Zqiang <<a href="mailto:qiang.zhang@windriver.com" target="_blank">qiang.zhang@windriver.com</a>><br>
---<br>
 libglusterfs/src/timer.c | 6 ++++++<br>
 1 file changed, 6 insertions(+)<br>
<br>
diff --git a/libglusterfs/src/timer.c b/libglusterfs/src/timer.c<br>
index 66c861b04c..2684d39667 100644<br>
--- a/libglusterfs/src/timer.c<br>
+++ b/libglusterfs/src/timer.c<br>
@@ -213,6 +213,12 @@ gf_timer_registry_init(glusterfs_ctx_t *ctx)<br>
     if (ret) {<br>
         gf_msg(THIS->name, GF_LOG_ERROR, ret, LG_MSG_PTHREAD_FAILED,<br>
                "Thread creation failed");<br>
+       LOCK(&ctx->lock);<br>
+       reg = ctx->timer;<br>
+       ctx->timer = NULL;<br>
+       UNLOCK(&ctx->lock);<br>
+       GF_FREE(reg);<br>
+       reg = NULL;<br>
     }<br>
<br>
 out:<br>
-- <br>
2.25.1<br>
<br>
</blockquote></div>