diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-10-28 16:45:40 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-10-28 16:45:40 +0000 |
commit | 738c998402c340b8c6b693216dbd2cab42262b5f (patch) | |
tree | bc379ab61524a4ee6896af462c767c62b06fe022 /src/fs/gnunet-auto-share.c | |
parent | 66bdbba886a79c557a81ee1565800eff056cdcc4 (diff) | |
download | gnunet-738c998402c340b8c6b693216dbd2cab42262b5f.tar.gz gnunet-738c998402c340b8c6b693216dbd2cab42262b5f.zip |
-minor cleanup, fixing minor bug in auto-share
Diffstat (limited to 'src/fs/gnunet-auto-share.c')
-rw-r--r-- | src/fs/gnunet-auto-share.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/fs/gnunet-auto-share.c b/src/fs/gnunet-auto-share.c index 886e0ba69..073b768db 100644 --- a/src/fs/gnunet-auto-share.c +++ b/src/fs/gnunet-auto-share.c | |||
@@ -721,6 +721,7 @@ free_item (void *cls, | |||
721 | return GNUNET_OK; | 721 | return GNUNET_OK; |
722 | } | 722 | } |
723 | 723 | ||
724 | |||
724 | /** | 725 | /** |
725 | * The main function to automatically publish content to GNUnet. | 726 | * The main function to automatically publish content to GNUnet. |
726 | * | 727 | * |
@@ -768,10 +769,13 @@ main (int argc, char *const *argv) | |||
768 | gettext_noop | 769 | gettext_noop |
769 | ("Automatically publish files from a directory on GNUnet"), | 770 | ("Automatically publish files from a directory on GNUnet"), |
770 | options, &run, NULL)) ? ret : 1; | 771 | options, &run, NULL)) ? ret : 1; |
771 | (void) GNUNET_CONTAINER_multihashmap_iterate (work_finished, | 772 | if (NULL != work_finished) |
772 | &free_item, | 773 | { |
773 | NULL); | 774 | (void) GNUNET_CONTAINER_multihashmap_iterate (work_finished, |
774 | GNUNET_CONTAINER_multihashmap_destroy (work_finished); | 775 | &free_item, |
776 | NULL); | ||
777 | GNUNET_CONTAINER_multihashmap_destroy (work_finished); | ||
778 | } | ||
775 | while (NULL != (wi = work_head)) | 779 | while (NULL != (wi = work_head)) |
776 | { | 780 | { |
777 | GNUNET_CONTAINER_DLL_remove (work_head, work_tail, wi); | 781 | GNUNET_CONTAINER_DLL_remove (work_head, work_tail, wi); |