From d7547ab18052726a69ee088876389a18798e03a8 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 23 Jun 2017 16:25:19 +0200 Subject: [PATCH] fix indexing issue found by jah and reported on gnunet-developers on 6-8/7/2017 --- src/util/service.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/service.c b/src/util/service.c index f63737e56..fcdf45a51 100644 --- a/src/util/service.c +++ b/src/util/service.c @@ -1283,15 +1283,14 @@ setup_service (struct GNUNET_SERVICE_Handle *sh) slc->sh = sh; slc->listen_socket = open_listen_socket (addrs[i], addrlens[i]); + GNUNET_free (addrs[i]); if (NULL == slc->listen_socket) { GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "bind"); - GNUNET_free (addrs[i++]); GNUNET_free (slc); continue; } - GNUNET_free (addrs[i++]); GNUNET_CONTAINER_DLL_insert (sh->slc_head, sh->slc_tail, slc); -- 2.25.1