diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2012-08-03 15:20:54 +0000 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2012-08-03 15:20:54 +0000 |
commit | 5348ed91bc946c5d4c01438c320f5af23c71d7b2 (patch) | |
tree | e1c168ac52cd4cdbf700f13385a164e4a51af526 /src/gns | |
parent | 8b5d3e0812ce91b3b1d579720eb7a72a194a84e7 (diff) | |
download | gnunet-5348ed91bc946c5d4c01438c320f5af23c71d7b2.tar.gz gnunet-5348ed91bc946c5d4c01438c320f5af23c71d7b2.zip |
-leaks
Diffstat (limited to 'src/gns')
-rw-r--r-- | src/gns/gnunet-gns-proxy.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index fee244443..2453cd9d3 100644 --- a/src/gns/gnunet-gns-proxy.c +++ b/src/gns/gnunet-gns-proxy.c | |||
@@ -1002,6 +1002,7 @@ mhd_content_free (void *cls, | |||
1002 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 1002 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
1003 | { | 1003 | { |
1004 | struct ProxyCurlTask *ctask = cls; | 1004 | struct ProxyCurlTask *ctask = cls; |
1005 | struct ProxyUploadData *pdata = ctask->upload_data_head; | ||
1005 | GNUNET_assert (NULL == ctask->pp_match_head); | 1006 | GNUNET_assert (NULL == ctask->pp_match_head); |
1006 | 1007 | ||
1007 | if (NULL != ctask->headers) | 1008 | if (NULL != ctask->headers) |
@@ -1016,6 +1017,18 @@ mhd_content_free (void *cls, | |||
1016 | if (NULL != ctask->post_handler) | 1017 | if (NULL != ctask->post_handler) |
1017 | MHD_destroy_post_processor (ctask->post_handler); | 1018 | MHD_destroy_post_processor (ctask->post_handler); |
1018 | 1019 | ||
1020 | for (; pdata != NULL; pdata = ctask->upload_data_head) | ||
1021 | { | ||
1022 | GNUNET_CONTAINER_DLL_remove (ctask->upload_data_head, | ||
1023 | ctask->upload_data_tail, | ||
1024 | pdata); | ||
1025 | GNUNET_free_non_null (pdata->filename); | ||
1026 | GNUNET_free_non_null (pdata->content_type); | ||
1027 | GNUNET_free_non_null (pdata->key); | ||
1028 | GNUNET_free_non_null (pdata->value); | ||
1029 | GNUNET_free (pdata); | ||
1030 | } | ||
1031 | |||
1019 | 1032 | ||
1020 | GNUNET_free (ctask); | 1033 | GNUNET_free (ctask); |
1021 | } | 1034 | } |
@@ -3071,6 +3084,7 @@ do_shutdown (void *cls, | |||
3071 | struct NetworkHandleList *tmp_nh; | 3084 | struct NetworkHandleList *tmp_nh; |
3072 | struct ProxyCurlTask *ctask; | 3085 | struct ProxyCurlTask *ctask; |
3073 | struct ProxyCurlTask *ctask_tmp; | 3086 | struct ProxyCurlTask *ctask_tmp; |
3087 | struct ProxyUploadData *pdata; | ||
3074 | 3088 | ||
3075 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 3089 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
3076 | "Shutting down...\n"); | 3090 | "Shutting down...\n"); |
@@ -3149,8 +3163,20 @@ do_shutdown (void *cls, | |||
3149 | if (NULL != ctask->response) | 3163 | if (NULL != ctask->response) |
3150 | MHD_destroy_response (ctask->response); | 3164 | MHD_destroy_response (ctask->response); |
3151 | 3165 | ||
3152 | //FIXME free pdata here | 3166 | pdata = ctask->upload_data_head; |
3153 | 3167 | ||
3168 | //FIXME free pdata here | ||
3169 | for (; pdata != NULL; pdata = ctask->upload_data_head) | ||
3170 | { | ||
3171 | GNUNET_CONTAINER_DLL_remove (ctask->upload_data_head, | ||
3172 | ctask->upload_data_tail, | ||
3173 | pdata); | ||
3174 | GNUNET_free_non_null (pdata->filename); | ||
3175 | GNUNET_free_non_null (pdata->content_type); | ||
3176 | GNUNET_free_non_null (pdata->key); | ||
3177 | GNUNET_free_non_null (pdata->value); | ||
3178 | GNUNET_free (pdata); | ||
3179 | } | ||
3154 | 3180 | ||
3155 | GNUNET_free (ctask); | 3181 | GNUNET_free (ctask); |
3156 | } | 3182 | } |