diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-06-25 17:34:57 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-06-25 17:34:57 +0000 |
commit | c4d9942632bbe89b7e5315bc21d65e0e0cd2682f (patch) | |
tree | f3ea8c462cc41c9a9366b4a675c19da3d67fbf58 /src/util/service.c | |
parent | bb388a929978c6feecc29133d071f1448619a3d4 (diff) | |
download | gnunet-c4d9942632bbe89b7e5315bc21d65e0e0cd2682f.tar.gz gnunet-c4d9942632bbe89b7e5315bc21d65e0e0cd2682f.zip |
leak
Diffstat (limited to 'src/util/service.c')
-rw-r--r-- | src/util/service.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/util/service.c b/src/util/service.c index c169a9d37..cff701a3c 100644 --- a/src/util/service.c +++ b/src/util/service.c | |||
@@ -895,6 +895,11 @@ GNUNET_SERVICE_get_server_addresses (const char *serviceName, | |||
895 | GNUNET_free (unixpath); | 895 | GNUNET_free (unixpath); |
896 | unixpath = NULL; | 896 | unixpath = NULL; |
897 | } | 897 | } |
898 | else | ||
899 | { | ||
900 | GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (desc)); | ||
901 | desc = NULL; | ||
902 | } | ||
898 | } | 903 | } |
899 | else | 904 | else |
900 | unixpath = NULL; | 905 | unixpath = NULL; |
@@ -908,8 +913,6 @@ GNUNET_SERVICE_get_server_addresses (const char *serviceName, | |||
908 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 913 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
909 | _("Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), | 914 | _("Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), |
910 | serviceName); | 915 | serviceName); |
911 | if (desc != NULL) | ||
912 | GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (desc)); | ||
913 | GNUNET_free_non_null(hostname); | 916 | GNUNET_free_non_null(hostname); |
914 | return GNUNET_SYSERR; | 917 | return GNUNET_SYSERR; |
915 | } | 918 | } |
@@ -943,8 +946,6 @@ GNUNET_SERVICE_get_server_addresses (const char *serviceName, | |||
943 | hostname, gai_strerror (ret)); | 946 | hostname, gai_strerror (ret)); |
944 | GNUNET_free (hostname); | 947 | GNUNET_free (hostname); |
945 | GNUNET_free (unixpath); | 948 | GNUNET_free (unixpath); |
946 | if (desc != NULL) | ||
947 | GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (desc)); | ||
948 | return GNUNET_SYSERR; | 949 | return GNUNET_SYSERR; |
949 | } | 950 | } |
950 | next = res; | 951 | next = res; |
@@ -1071,8 +1072,6 @@ GNUNET_SERVICE_get_server_addresses (const char *serviceName, | |||
1071 | GNUNET_free_non_null (unixpath); | 1072 | GNUNET_free_non_null (unixpath); |
1072 | *addrs = saddrs; | 1073 | *addrs = saddrs; |
1073 | *addr_lens = saddrlens; | 1074 | *addr_lens = saddrlens; |
1074 | if (desc != NULL) | ||
1075 | GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (desc)); | ||
1076 | return resi; | 1075 | return resi; |
1077 | } | 1076 | } |
1078 | 1077 | ||