From 558a5d3e892dab4690c9f980b3e175ac26e4e077 Mon Sep 17 00:00:00 2001 From: Alex Colomar Date: Fri, 9 Sep 2022 13:40:17 +0100 Subject: Fixed a mutex leak in the C API. In nxt_unit_create() we could leak a mutex created in nxt_unit_ctx_init(). This could happen if nxt_unit_ctx_init() succeeded but later on we bailed out of nxt_unit_create(), we would destroy the mutex created in nxt_unit_create() but not the one created in nxt_unit_ctx_init(). Reorder things so that we do the call to nxt_unit_create() after all the other checks so if it fails we don't leak the mutex it created. Co-developed-by: Andrew Clayton Signed-off-by: Andrew Clayton Signed-off-by: Alex Colomar --- docs/changes.xml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docs') diff --git a/docs/changes.xml b/docs/changes.xml index 989001dd..0175fd33 100644 --- a/docs/changes.xml +++ b/docs/changes.xml @@ -122,6 +122,12 @@ the prototype crashed. + + +mutex leak in the C API. + + + -- cgit