diff options
Diffstat (limited to 'src/statistics')
-rw-r--r-- | src/statistics/statistics_api.c | 7 |
1 files changed, 6 insertions, 1 deletions
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, | |||
738 | ret->cfg = cfg; | 738 | ret->cfg = cfg; |
739 | ret->subsystem = GNUNET_strdup (subsystem); | 739 | ret->subsystem = GNUNET_strdup (subsystem); |
740 | ret->backoff = GNUNET_TIME_UNIT_MILLISECONDS; | 740 | ret->backoff = GNUNET_TIME_UNIT_MILLISECONDS; |
741 | try_connect (ret); | 741 | if (GNUNET_YES != try_connect (ret)) |
742 | { | ||
743 | GNUNET_free (ret->subsystem); | ||
744 | GNUNET_free (ret); | ||
745 | return NULL; | ||
746 | } | ||
742 | return ret; | 747 | return ret; |
743 | } | 748 | } |
744 | 749 | ||