From: Christian Grothoff Date: Tue, 21 Dec 2010 16:22:05 +0000 (+0000) Subject: fail on fatal connect error X-Git-Tag: initial-import-from-subversion-38251~19451 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2685a36c06c65970155ab21dc4891c9721a3c92a;p=oweals%2Fgnunet.git fail on fatal connect error --- diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c index 5bca6c786..b697d33f1 100644 --- a/src/statistics/statistics_api.c +++ b/src/statistics/statistics_api.c @@ -738,7 +738,12 @@ GNUNET_STATISTICS_create (const char *subsystem, ret->cfg = cfg; ret->subsystem = GNUNET_strdup (subsystem); ret->backoff = GNUNET_TIME_UNIT_MILLISECONDS; - try_connect (ret); + if (GNUNET_YES != try_connect (ret)) + { + GNUNET_free (ret->subsystem); + GNUNET_free (ret); + return NULL; + } return ret; }