From 54c37a3df6258d97764f6d88f8d3f9e907e457c9 Mon Sep 17 00:00:00 2001 From: Denis Biryukov Date: Fri, 13 Sep 2024 00:37:25 +0200 Subject: [PATCH] fix session ref count leak in query_reply_err --- src/api/api.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api/api.c b/src/api/api.c index 52b3803e2..068780e20 100644 --- a/src/api/api.c +++ b/src/api/api.c @@ -1508,6 +1508,7 @@ int8_t z_query_reply_err(const z_loaned_query_t *query, z_moved_bytes_t *payload .encoding = _z_encoding_from_owned(&opts.encoding->_this)}; int8_t ret = _z_send_reply_err(_Z_RC_IN_VAL(query), &sess_rc, value); + _z_session_rc_drop(&sess_rc); z_bytes_drop(payload); // Clean-up z_encoding_drop(opts.encoding);