Fixed Codesonar 10128.70650 Leak
authorMatthias Wachs <wachs@net.in.tum.de>
Mon, 16 Aug 2010 09:36:27 +0000 (09:36 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Mon, 16 Aug 2010 09:36:27 +0000 (09:36 +0000)
src/transport/plugin_transport_https.c

index ea97712b5375c796738cbe94ea453f176effd0d7..644b431f36b3bb270c7c2d14703d3fdd206e002c 100644 (file)
@@ -617,12 +617,11 @@ process_interfaces (void *cls,
   else if ((af == AF_INET6) && (plugin->use_ipv6 == GNUNET_YES)  && (plugin->bind4_address == NULL))
     {
          struct in6_addr bnd_cmp6 = ((struct sockaddr_in6 *) addr)->sin6_addr;
-      t6 = GNUNET_malloc(sizeof(struct IPv6HttpAddress));
       if (IN6_IS_ADDR_LINKLOCAL (&((struct sockaddr_in6 *) addr)->sin6_addr))
-        {
-          return GNUNET_OK;
-        }
-
+         {
+                 return GNUNET_OK;
+         }
+      t6 = GNUNET_malloc(sizeof(struct IPv6HttpAddress));
       if (plugin->bind6_address != NULL)
       {
          if (0 == memcmp(&plugin->bind6_address->sin6_addr, &bnd_cmp6, sizeof (struct in6_addr)))