aboutsummaryrefslogtreecommitdiff
path: root/src/util/scheduler.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-21 00:54:49 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-21 00:54:49 +0200
commit30361fe0e89a72e2dd248a93824b06d858e4e81a (patch)
tree5cd5b9917bf1fb6899587683ab1680472c29194a /src/util/scheduler.c
parent172d6b0c471cd6512b8074d78f59ae9bb8cad9e7 (diff)
downloadgnunet-30361fe0e89a72e2dd248a93824b06d858e4e81a.tar.gz
gnunet-30361fe0e89a72e2dd248a93824b06d858e4e81a.zip
make GNUNET_freez default, have GNUNET_free_nz for cases where that does not work
Diffstat (limited to 'src/util/scheduler.c')
-rw-r--r--src/util/scheduler.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/util/scheduler.c b/src/util/scheduler.c
index 45a6b61e5..93393bd7c 100644
--- a/src/util/scheduler.c
+++ b/src/util/scheduler.c
@@ -584,28 +584,26 @@ dump_backtrace (struct GNUNET_SCHEDULER_Task *t)
584static void 584static void
585destroy_task (struct GNUNET_SCHEDULER_Task *t) 585destroy_task (struct GNUNET_SCHEDULER_Task *t)
586{ 586{
587 unsigned int i;
588
589 LOG (GNUNET_ERROR_TYPE_DEBUG, 587 LOG (GNUNET_ERROR_TYPE_DEBUG,
590 "destroying task %p\n", 588 "destroying task %p\n",
591 t); 589 t);
592 590
593 if (GNUNET_YES == t->own_handles) 591 if (GNUNET_YES == t->own_handles)
594 { 592 {
595 for (i = 0; i != t->fds_len; ++i) 593 for (unsigned int i = 0; i != t->fds_len; ++i)
596 { 594 {
597 const struct GNUNET_NETWORK_Handle *fd = t->fds[i].fd; 595 const struct GNUNET_NETWORK_Handle *fd = t->fds[i].fd;
598 const struct GNUNET_DISK_FileHandle *fh = t->fds[i].fh; 596 const struct GNUNET_DISK_FileHandle *fh = t->fds[i].fh;
599 if (fd) 597 if (fd)
600 { 598 {
601 GNUNET_NETWORK_socket_free_memory_only_ ((struct 599 GNUNET_NETWORK_socket_free_memory_only_ (
602 GNUNET_NETWORK_Handle *) fd); 600 (struct GNUNET_NETWORK_Handle *) fd);
603 } 601 }
604 if (fh) 602 if (fh)
605 { 603 {
606 // FIXME: on WIN32 this is not enough! A function 604 // FIXME: on WIN32 this is not enough! A function
607 // GNUNET_DISK_file_free_memory_only would be nice 605 // GNUNET_DISK_file_free_memory_only would be nice
608 GNUNET_free ((void *) fh); 606 GNUNET_free_nz ((void *) fh);
609 } 607 }
610 } 608 }
611 } 609 }