Skip to content

Commit

Permalink
Fix small leak of the persistent connection cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
avsej committed Sep 24, 2024
1 parent 2e3f0ed commit 09484d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wrapper/persistent_connections_cache.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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=\"{}\", "
Expand Down

0 comments on commit 09484d0

Please sign in to comment.