[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r15986 - gnunet/src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r15986 - gnunet/src/util |
Date: |
Fri, 15 Jul 2011 11:06:54 +0200 |
Author: grothoff
Date: 2011-07-15 11:06:53 +0200 (Fri, 15 Jul 2011)
New Revision: 15986
Modified:
gnunet/src/util/client.c
Log:
leakfix
Modified: gnunet/src/util/client.c
===================================================================
--- gnunet/src/util/client.c 2011-07-15 09:04:21 UTC (rev 15985)
+++ gnunet/src/util/client.c 2011-07-15 09:06:53 UTC (rev 15986)
@@ -275,11 +275,12 @@
if (0 == (attempt % 2))
{
/* on even rounds, try UNIX */
- if ((GNUNET_OK ==
- GNUNET_CONFIGURATION_get_value_string (cfg,
- service_name,
- "UNIXPATH", &unixpath)) &&
- (0 < strlen (unixpath))) /* We have a non-NULL unixpath, does that
mean it's valid? */
+ unixpath = NULL;
+ if ( (GNUNET_OK ==
+ GNUNET_CONFIGURATION_get_value_string (cfg,
+ service_name,
+ "UNIXPATH", &unixpath)) &&
+ (0 < strlen (unixpath)) ) /* We have a non-NULL unixpath, does that
mean it's valid? */
{
sock = GNUNET_CONNECTION_create_from_connect_to_unixpath (cfg,
unixpath);
if (sock != NULL)
@@ -325,21 +326,23 @@
if (0 != (attempt % 2))
{
/* try UNIX */
- if ((GNUNET_OK ==
- GNUNET_CONFIGURATION_get_value_string (cfg,
- service_name,
- "UNIXPATH", &unixpath)) &&
- (0 < strlen (unixpath)))
+ unixpath = NULL;
+ if ( (GNUNET_OK ==
+ GNUNET_CONFIGURATION_get_value_string (cfg,
+ service_name,
+ "UNIXPATH", &unixpath))
&&
+ (0 < strlen (unixpath)))
{
sock = GNUNET_CONNECTION_create_from_connect_to_unixpath (cfg,
unixpath);
- GNUNET_free (unixpath);
if (sock != NULL)
{
+ GNUNET_free (unixpath);
GNUNET_free (hostname);
return sock;
}
}
+ GNUNET_free_non_null (unixpath);
}
#endif
#if DEBUG_CLIENT
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r15986 - gnunet/src/util,
gnunet <=