void calipso_resource_unalloc(calipso_resource_t *resource) { if(resource->resource_fd > 0) close(resource->resource_fd); cpo_pool_destroy(resource->pool); free(resource); return; }
void calipso_request_unalloc(calipso_request_t *request) { if (request->reply != NULL) { calipso_reply_unalloc(request->reply); } if (request->header != NULL) { hash_table_destroy(request->header); } if (request->in_filter) { chunks_destroy(request->in_filter); } if (request->pool != NULL) { cpo_pool_destroy(request->pool); } free(request); request = NULL; }
void calipso_reply_unalloc(calipso_reply_t *reply) { if (reply->header) { hash_table_destroy(reply->header); } if (reply->resource) { calipso_resource_unalloc(reply->resource); } /* clear filter*/ if (reply->out_filter) { //chunks_dump(reply->out_filter); chunks_destroy(reply->out_filter); } if (reply->pool) { //cpo_pool_dump(reply->pool); cpo_pool_destroy(reply->pool); } free(reply); }