From: Date: Mon, 21 Apr 2008 17:14:28 +0000 (-0700) Subject: Pulling in Mark's fixes for memory leaks in memslap X-Git-Tag: 0.20~1^2~10 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=3d1c182f0918fc41bb8a580494771f7504c5deb2;p=awesomized%2Flibmemcached Pulling in Mark's fixes for memory leaks in memslap --- diff --git a/clients/memslap.c b/clients/memslap.c index ee1920c7..52abb4b1 100644 --- a/clients/memslap.c +++ b/clients/memslap.c @@ -219,6 +219,7 @@ void scheduler(memcached_server_st *servers, conclusions_st *conclusion) conclusion->load_time= timedif(end_time, start_time); conclusion->read_time= timedif(end_time, start_time); pairs_free(pairs); + memcached_free(memc); } void options_parse(int argc, char *argv[]) @@ -353,6 +354,10 @@ void *run_task(void *p) if (context->execute_pairs) pairs_free(context->execute_pairs); + + if (context->initial_pairs) + pairs_free(context->initial_pairs); + free(context); pthread_mutex_lock(&counter_mutex);