Skip to content

Commit 06f1db5

Browse files
committed
multi_runsingle: bail out early on data->conn == NULL
As that's a significant error condition and scan-build warns for NULL pointer dereferences if we don't. Closes #6433
1 parent 48220f7 commit 06f1db5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/multi.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1589,9 +1589,12 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
15891589
process_pending_handles(multi); /* multiplexed */
15901590
}
15911591

1592-
if(data->conn && data->mstate > CURLM_STATE_CONNECT &&
1592+
if(data->mstate > CURLM_STATE_CONNECT &&
15931593
data->mstate < CURLM_STATE_COMPLETED) {
15941594
/* Make sure we set the connection's current owner */
1595+
DEBUGASSERT(data->conn);
1596+
if(!data->conn)
1597+
return CURLM_INTERNAL_ERROR;
15951598
data->conn->data = data;
15961599
}
15971600

0 commit comments

Comments
 (0)