diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-10 09:32:25 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-10 09:32:25 +0000 |
commit | df70bc0951a8789441170770096c537666ba0c99 (patch) | |
tree | a273d82fd7d2beec803e7fb9ab8bbaeeaf06f1f8 /src/util/client.c | |
parent | 484976f3a0fc05eda9b2c7985cc2069c0d036464 (diff) | |
download | gnunet-df70bc0951a8789441170770096c537666ba0c99.tar.gz gnunet-df70bc0951a8789441170770096c537666ba0c99.zip |
-fix leak
Diffstat (limited to 'src/util/client.c')
-rw-r--r-- | src/util/client.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/util/client.c b/src/util/client.c index 825c8ec52..f656cc20f 100644 --- a/src/util/client.c +++ b/src/util/client.c | |||
@@ -379,7 +379,10 @@ do_connect (const char *service_name, | |||
379 | /* if port is 0, try UNIX */ | 379 | /* if port is 0, try UNIX */ |
380 | connection = try_unixpath (service_name, cfg); | 380 | connection = try_unixpath (service_name, cfg); |
381 | if (NULL != connection) | 381 | if (NULL != connection) |
382 | { | ||
383 | GNUNET_free_non_null (hostname); | ||
382 | return connection; | 384 | return connection; |
385 | } | ||
383 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 386 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
384 | "Port is 0 for service `%s', UNIXPATH did not work, returning NULL!\n", | 387 | "Port is 0 for service `%s', UNIXPATH did not work, returning NULL!\n", |
385 | service_name); | 388 | service_name); |
@@ -832,8 +835,8 @@ GNUNET_CLIENT_service_test (const char *service, | |||
832 | char *unixpath; | 835 | char *unixpath; |
833 | 836 | ||
834 | unixpath = NULL; | 837 | unixpath = NULL; |
835 | if ((GNUNET_OK == | 838 | if ((GNUNET_OK == |
836 | GNUNET_CONFIGURATION_get_value_filename (cfg, service, "UNIXPATH", &unixpath)) && | 839 | GNUNET_CONFIGURATION_get_value_filename (cfg, service, "UNIXPATH", &unixpath)) && |
837 | (0 < strlen (unixpath))) /* We have a non-NULL unixpath, does that mean it's valid? */ | 840 | (0 < strlen (unixpath))) /* We have a non-NULL unixpath, does that mean it's valid? */ |
838 | { | 841 | { |
839 | if (strlen (unixpath) >= sizeof (s_un.sun_path)) | 842 | if (strlen (unixpath) >= sizeof (s_un.sun_path)) |