Thanks! Fixed as suggested. Sorry for the delay... On 06/08/2017 08:40 PM, jah wrote: > On 07/06/17 08:10, LRN wrote: >> For that matter, it should be possible to GNUNET_free(addrs[i]) >> unconditionally, before the socket opening check (GCC probably optimizes like >> that anyway, but why not help it?). > > Thank you LRN, yes it is possible and here's the improved patch:- > > --- > 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 d195452c9..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); >
signature.asc
Description: OpenPGP digital signature
_______________________________________________ GNUnet-developers mailing list GNUnet-developers@gnu.org https://lists.gnu.org/mailman/listinfo/gnunet-developers