From 09484d0cae74595cd9b846e2f378b7f88af048f6 Mon Sep 17 00:00:00 2001
From: Sergey Avseyev <sergey.avseyev@gmail.com>
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..3f4637f5 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_);
+    zend_string_dup(connection_hash, false), 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=\"{}\", "