Pulling in Mark's fixes for memory leaks in memslap
author <brian@localhost.localdomain> <>
Mon, 21 Apr 2008 17:14:28 +0000 (10:14 -0700)
committer <brian@localhost.localdomain> <>
Mon, 21 Apr 2008 17:14:28 +0000 (10:14 -0700)
clients/memslap.c

index ee1920c73f5cda697c3ba60b051e3adb54634819..52abb4b1e2707fcf071bed31a4a18b50cbbd7341 100644 (file)
@@ -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);