- Fixed memory leak / possible crash of freeing an invalid pointer
authorBart Polot <bart@net.in.tum.de>
Thu, 8 Dec 2011 15:39:18 +0000 (15:39 +0000)
committerBart Polot <bart@net.in.tum.de>
Thu, 8 Dec 2011 15:39:18 +0000 (15:39 +0000)
src/testing/testing_group.c

index f56c51381b6518350237a8c371b5857723345b56..2f59cae727dce7ac38144542cf0b09a931de878d 100644 (file)
@@ -5149,13 +5149,15 @@ stats_check_existing (struct GNUNET_TESTING_PeerGroup *pg,
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_get_value_string (specific_peer->cfg, "statistics",
                                              "unixpath", &unix_domain_socket))
+  {
+    GNUNET_free (unix_domain_socket);
     return GNUNET_NO;
+  }
 
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_get_value_number (specific_peer->cfg, "statistics",
                                              "port", &port))
   {
-    GNUNET_free (unix_domain_socket);
     return GNUNET_NO;
   }