Fix allocation on stat so that it uses malloc() since a user will need to use free...
[awesomized/libmemcached] / clients / generator.cc
index 011ed3a499bb778ed5963d3695d4cb48088967b3..b2ba67caef9ad91370476e4469f59198eccca678 100644 (file)
@@ -1,4 +1,5 @@
 /* LibMemcached
+ * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/
  * Copyright (C) 2006-2009 Brian Aker
  * All rights reserved.
  *
@@ -9,7 +10,7 @@
  *
  */
 
-#include <config.h>
+#include <mem_config.h>
 
 #include <stdint.h>
 
@@ -44,14 +45,18 @@ static void get_random_string(char *buffer, size_t size)
 void pairs_free(pairs_st *pairs)
 {
   if (pairs == NULL)
+  {
     return;
+  }
 
   /* We free until we hit the null pair we stores during creation */
   for (uint32_t x= 0; pairs[x].key; x++)
   {
     free(pairs[x].key);
     if (pairs[x].value)
+    {
       free(pairs[x].value);
+    }
   }
 
   free(pairs);