File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -236,6 +236,7 @@ fn makeTransfer(self: *Client, req: Request) !*Transfer {
236236 const id = self .next_request_id + 1 ;
237237 self .next_request_id = id ;
238238 transfer .* = .{
239+ .arena = ArenaAllocator .init (self .allocator ),
239240 .id = id ,
240241 .uri = uri ,
241242 .req = req ,
@@ -534,6 +535,7 @@ pub const Request = struct {
534535};
535536
536537pub const Transfer = struct {
538+ arena : ArenaAllocator ,
537539 id : usize = 0 ,
538540 req : Request ,
539541 uri : std.Uri , // used for setting/getting the cookie
@@ -553,6 +555,7 @@ pub const Transfer = struct {
553555 if (self ._handle ) | handle | {
554556 self .client .handles .release (handle );
555557 }
558+ self .arena .deinit ();
556559 self .client .transfer_pool .destroy (self );
557560 }
558561
@@ -641,7 +644,7 @@ pub const Transfer = struct {
641644 if (transfer ._redirecting and buf_len == 2 ) {
642645 // parse and set cookies for the redirection.
643646 redirectionCookies (
644- transfer .client . arena .allocator (),
647+ transfer .arena .allocator (),
645648 easy ,
646649 transfer .req .cookie_jar ,
647650 & transfer .uri ,
You can’t perform that action at this time.
0 commit comments