gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r30080 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r30080 - gnunet/src/util
Date: Thu, 10 Oct 2013 11:32:25 +0200

Author: grothoff
Date: 2013-10-10 11:32:25 +0200 (Thu, 10 Oct 2013)
New Revision: 30080

Modified:
   gnunet/src/util/client.c
Log:
-fix leak

Modified: gnunet/src/util/client.c
===================================================================
--- gnunet/src/util/client.c    2013-10-10 09:31:24 UTC (rev 30079)
+++ gnunet/src/util/client.c    2013-10-10 09:32:25 UTC (rev 30080)
@@ -379,7 +379,10 @@
     /* if port is 0, try UNIX */
     connection = try_unixpath (service_name, cfg);
     if (NULL != connection)
+    {
+      GNUNET_free_non_null (hostname);
       return connection;
+    }
     LOG (GNUNET_ERROR_TYPE_DEBUG,
          "Port is 0 for service `%s', UNIXPATH did not work, returning 
NULL!\n",
          service_name);
@@ -832,8 +835,8 @@
     char *unixpath;
 
     unixpath = NULL;
-    if ((GNUNET_OK == 
-        GNUNET_CONFIGURATION_get_value_filename (cfg, service, "UNIXPATH", 
&unixpath)) && 
+    if ((GNUNET_OK ==
+        GNUNET_CONFIGURATION_get_value_filename (cfg, service, "UNIXPATH", 
&unixpath)) &&
        (0 < strlen (unixpath)))  /* We have a non-NULL unixpath, does that 
mean it's valid? */
     {
       if (strlen (unixpath) >= sizeof (s_un.sun_path))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]