Unverified Commit da1e9573 by Edward Thomson Committed by GitHub

Merge pull request #6705 from libgit2/ethomson/httpclient

httpclient: clear client->parser.data after use
parents 0667c771 52daefc6
......@@ -1252,6 +1252,7 @@ static void complete_response_body(git_http_client *client)
}
done:
client->parser.data = NULL;
git_str_clear(&client->read_buf);
}
......@@ -1441,6 +1442,7 @@ int git_http_client_read_response(
done:
git_str_dispose(&parser_context.parse_header_name);
git_str_dispose(&parser_context.parse_header_value);
client->parser.data = NULL;
return error;
}
......@@ -1496,6 +1498,8 @@ done:
if (error < 0)
client->connected = 0;
client->parser.data = NULL;
return error;
}
......@@ -1530,6 +1534,8 @@ int git_http_client_skip_body(git_http_client *client)
if (error < 0)
client->connected = 0;
client->parser.data = NULL;
return error;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment