Skip to content

Commit 37f29f2

Browse files
committed
* MDF [conf] Release ACL cache related resources to avoid memory leaks
Signed-off-by: Moi Ran <maoyi.ran@emqx.io> Signed-off-by: Jaylin <jaylin@emqx.io>
1 parent 7147595 commit 37f29f2

File tree

1 file changed

+4
-1
lines changed
  • src/supplemental/nanolib

1 file changed

+4
-1
lines changed

src/supplemental/nanolib/conf.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4399,7 +4399,10 @@ conf_auth_http_destroy(conf_auth_http *auth_http)
43994399
conf_auth_http_req_destroy(&auth_http->auth_req);
44004400
conf_auth_http_req_destroy(&auth_http->super_req);
44014401
conf_auth_http_req_destroy(&auth_http->acl_req);
4402-
nng_mtx_free(auth_http->acl_cache_mtx);
4402+
if (auth_http->acl_cache_mtx != NULL) {
4403+
nng_mtx_free(auth_http->acl_cache_mtx);
4404+
auth_http->acl_cache_mtx = NULL;
4405+
}
44034406
}
44044407

44054408
static void

0 commit comments

Comments
 (0)