From 5903d98d9cea5f492735733898493dccbd444334 Mon Sep 17 00:00:00 2001 From: Sergey Avseyev Date: Tue, 24 Sep 2024 11:48:50 -0700 Subject: [PATCH] Fix small leak of the persistent connection cache key --- src/wrapper/persistent_connections_cache.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wrapper/persistent_connections_cache.cxx b/src/wrapper/persistent_connections_cache.cxx index d70ac2e8..9c6c75d7 100644 --- a/src/wrapper/persistent_connections_cache.cxx +++ b/src/wrapper/persistent_connections_cache.cxx @@ -147,7 +147,7 @@ create_persistent_connection(zend_string* connection_hash, return { nullptr, rc }; } zend_register_persistent_resource_ex( - zend_string_dup(connection_hash, 1), handle, persistent_connection_destructor_id_); + connection_hash, handle, persistent_connection_destructor_id_); auto current_persistent = ++COUCHBASE_G(num_persistent); CB_LOG_DEBUG("persistent connection miss, created new connection: handle={}, connection_hash={}, " "connection_string=\"{}\", "