Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
da1e9573
Unverified
Commit
da1e9573
authored
Dec 21, 2023
by
Edward Thomson
Committed by
GitHub
Dec 21, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6705 from libgit2/ethomson/httpclient
httpclient: clear client->parser.data after use
parents
0667c771
52daefc6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
src/libgit2/transports/httpclient.c
+6
-0
No files found.
src/libgit2/transports/httpclient.c
View file @
da1e9573
...
@@ -1252,6 +1252,7 @@ static void complete_response_body(git_http_client *client)
...
@@ -1252,6 +1252,7 @@ static void complete_response_body(git_http_client *client)
}
}
done
:
done
:
client
->
parser
.
data
=
NULL
;
git_str_clear
(
&
client
->
read_buf
);
git_str_clear
(
&
client
->
read_buf
);
}
}
...
@@ -1441,6 +1442,7 @@ int git_http_client_read_response(
...
@@ -1441,6 +1442,7 @@ int git_http_client_read_response(
done
:
done
:
git_str_dispose
(
&
parser_context
.
parse_header_name
);
git_str_dispose
(
&
parser_context
.
parse_header_name
);
git_str_dispose
(
&
parser_context
.
parse_header_value
);
git_str_dispose
(
&
parser_context
.
parse_header_value
);
client
->
parser
.
data
=
NULL
;
return
error
;
return
error
;
}
}
...
@@ -1496,6 +1498,8 @@ done:
...
@@ -1496,6 +1498,8 @@ done:
if
(
error
<
0
)
if
(
error
<
0
)
client
->
connected
=
0
;
client
->
connected
=
0
;
client
->
parser
.
data
=
NULL
;
return
error
;
return
error
;
}
}
...
@@ -1530,6 +1534,8 @@ int git_http_client_skip_body(git_http_client *client)
...
@@ -1530,6 +1534,8 @@ int git_http_client_skip_body(git_http_client *client)
if
(
error
<
0
)
if
(
error
<
0
)
client
->
connected
=
0
;
client
->
connected
=
0
;
client
->
parser
.
data
=
NULL
;
return
error
;
return
error
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment