On 04/19/2011 08:48 AM, John David Duncan wrote:
> #At file:///Users/jdd/bzr-repo/working/cluster-7.2-labs-memcached/ based on
> revid:john.duncan@stripped
>
> 4162 John David Duncan 2011-04-18
> Duplicate connectstring before storing it. This should fix bug resulting in a
> garbled connectstring and extra cluster connection.
>
Where is that memory freed?
> modified:
> storage/ndb/memcache/src/Configuration.cc
> === modified file 'storage/ndb/memcache/src/Configuration.cc'
> --- a/storage/ndb/memcache/src/Configuration.cc 2011-04-09 07:36:24 +0000
> +++ b/storage/ndb/memcache/src/Configuration.cc 2011-04-19 06:47:32 +0000
> @@ -580,7 +580,7 @@ bool config_v1::get_connections() {
> if(str_is_null)
> connection_idx = conf.storeConnection(0, rtt);
> else
> - connection_idx = conf.storeConnection(connectstring, rtt);
> + connection_idx = conf.storeConnection(strdup(connectstring), rtt);
>
> DEBUG_PRINT("[%d]: { %d => \"%s\" [rtt: %d]}", connection_idx,
> cfg_data_id, str_is_null ? "" : connectstring, rtt);
>
>
>
>
>