Skip to content

Commit a4287c3

Browse files
authored
Fix allocator mismatch by replacing free() with libmemcached_free()
Merge pull request #28 from stav-bentov/master
2 parents cf5c5ad + 1287910 commit a4287c3

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

libmemcached/hash.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ static inline char *_config_get(memcached_st *ptr)
291291
{
292292
cur_position = server_idx;
293293

294-
if (config != NULL) free(config);
294+
if (config != NULL) libmemcached_free(ptr, config);
295295
}
296296
}
297297

@@ -364,7 +364,7 @@ static inline void _update_server_list(memcached_st *ptr)
364364
ptr->polling.last_successful = time(NULL);
365365
}
366366

367-
free(config);
367+
libmemcached_free(ptr, config);
368368

369369
}
370370

libmemcached/hosts.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ char inline *_retrieve_config_with_retries(memcached_st *ptr, memcached_return_t
965965
else
966966
{
967967
retry_count++;
968-
if (config != NULL) free(config);
968+
if (config != NULL) libmemcached_free(ptr, config);
969969
}
970970
}
971971

0 commit comments

Comments
 (0)