From: Christian Grothoff Date: Tue, 21 Dec 2010 16:23:14 +0000 (+0000) Subject: fail on fatal connect error X-Git-Tag: initial-import-from-subversion-38251~19450 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3051850f341a640d5cbbd8c9d66c7030e0d7328e;p=oweals%2Fgnunet.git fail on fatal connect error --- diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c index b697d33f1..d44bc77d1 100644 --- a/src/statistics/statistics_api.c +++ b/src/statistics/statistics_api.c @@ -766,6 +766,7 @@ GNUNET_STATISTICS_destroy (struct GNUNET_STATISTICS_Handle *h, struct GNUNET_TIME_Relative timeout; int i; + if (h == NULL) return; if (GNUNET_SCHEDULER_NO_TASK != h->backoff_task) GNUNET_SCHEDULER_cancel (h->backoff_task); if (sync_first) @@ -918,6 +919,7 @@ schedule_action (struct GNUNET_STATISTICS_Handle *h) } } + /** * Get statistic from the peer. * @@ -1025,6 +1027,8 @@ GNUNET_STATISTICS_watch (struct GNUNET_STATISTICS_Handle *handle, { struct GNUNET_STATISTICS_WatchEntry *w; + if (handle == NULL) + return GNUNET_SYSERR; w = GNUNET_malloc (sizeof (struct GNUNET_STATISTICS_WatchEntry)); w->subsystem = GNUNET_strdup (subsystem); w->name = GNUNET_strdup (name);