-fix leak
authorChristian Grothoff <christian@grothoff.org>
Wed, 25 Jan 2012 10:32:12 +0000 (10:32 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 25 Jan 2012 10:32:12 +0000 (10:32 +0000)
src/statistics/gnunet-service-statistics.c

index 1d636bd25cb5ba053b1bfd6fe157c4b4a824e480..a890d6d8ec339871ec0d002b8c0a84c2394dad11 100644 (file)
@@ -192,6 +192,7 @@ load (struct GNUNET_SERVER_Handle *server)
   rh = GNUNET_BIO_read_open (fn);
   if (!rh)
   {
+    GNUNET_free (buf);
     GNUNET_free (fn);
     return;
   }
@@ -199,6 +200,7 @@ load (struct GNUNET_SERVER_Handle *server)
   {
     GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "read", fn);
     GNUNET_break (GNUNET_OK == GNUNET_BIO_read_close (rh, &emsg));
+    GNUNET_free (buf);
     GNUNET_free_non_null (emsg);
     GNUNET_free (fn);
     return;