diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-07-02 20:12:52 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-07-02 20:12:52 +0000 |
commit | a975c050f211d2ebe70eb78915fb30e0211ece64 (patch) | |
tree | dce743deca8108154bf841c097d75194c198fd4f /src/namestore | |
parent | b15f1d846989340440c41198ac8ae710ae37bdf5 (diff) | |
download | gnunet-a975c050f211d2ebe70eb78915fb30e0211ece64.tar.gz gnunet-a975c050f211d2ebe70eb78915fb30e0211ece64.zip |
-fix use after free on shutdown
Diffstat (limited to 'src/namestore')
-rw-r--r-- | src/namestore/namestore_api.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c index f5b9d941b..afb7265d8 100644 --- a/src/namestore/namestore_api.c +++ b/src/namestore/namestore_api.c | |||
@@ -824,7 +824,7 @@ force_reconnect (struct GNUNET_NAMESTORE_Handle *h) | |||
824 | 824 | ||
825 | GNUNET_MQ_destroy (h->mq); | 825 | GNUNET_MQ_destroy (h->mq); |
826 | h->mq = NULL; | 826 | h->mq = NULL; |
827 | for (ze = h->z_head; NULL != ze; ze = ze->next) | 827 | while (NULL != (ze = h->z_head)) |
828 | { | 828 | { |
829 | /* FIXME: This does not allow clients to distinguish | 829 | /* FIXME: This does not allow clients to distinguish |
830 | iteration error from successful termination! */ | 830 | iteration error from successful termination! */ |
@@ -832,7 +832,7 @@ force_reconnect (struct GNUNET_NAMESTORE_Handle *h) | |||
832 | ze->proc (ze->proc_cls, NULL, NULL, 0, NULL); | 832 | ze->proc (ze->proc_cls, NULL, NULL, 0, NULL); |
833 | free_ze (ze); | 833 | free_ze (ze); |
834 | } | 834 | } |
835 | for (qe = h->op_head; NULL != qe; qe = qe->next) | 835 | while (NULL != (qe = h->op_head)) |
836 | { | 836 | { |
837 | /* FIXME: This does not allow clients to distinguish | 837 | /* FIXME: This does not allow clients to distinguish |
838 | iteration error from successful termination! */ | 838 | iteration error from successful termination! */ |