1
0
mirror of https://github.com/moparisthebest/curl synced 2025-01-11 05:58:01 -05:00

send: assert that Curl_write_plain() has a ->conn when called

To help catch bad invokes.

Closes #6476
This commit is contained in:
Daniel Stenberg 2021-01-18 08:55:13 +01:00
parent 11b2dd86d3
commit 2bf77b3cba
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -406,7 +406,9 @@ CURLcode Curl_write_plain(struct Curl_easy *data,
{
CURLcode result;
struct connectdata *conn = data->conn;
int num = (sockfd == conn->sock[SECONDARYSOCKET]);
int num;
DEBUGASSERT(conn);
num = (sockfd == conn->sock[SECONDARYSOCKET]);
*written = Curl_send_plain(data, num, mem, len, &result);