summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/sendf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sendf.c b/lib/sendf.c
index e756f1ca1..5075c5439 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -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);