1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

Pointer "conn" dereferenced before NULL check. found by coverity.com scan

This commit is contained in:
Daniel Stenberg 2007-03-30 20:54:32 +00:00
parent 74e54c5a49
commit 75db459f0a

View File

@ -2498,11 +2498,13 @@ Curl_setup_transfer(
) )
{ {
struct connectdata *conn = (struct connectdata *)c_conn; struct connectdata *conn = (struct connectdata *)c_conn;
struct SessionHandle *data = conn->data; struct SessionHandle *data;
if(!conn) if(!conn)
return CURLE_BAD_FUNCTION_ARGUMENT; return CURLE_BAD_FUNCTION_ARGUMENT;
data = conn->data;
DEBUGASSERT((sockindex <= 1) && (sockindex >= -1)); DEBUGASSERT((sockindex <= 1) && (sockindex >= -1));
/* now copy all input parameters */ /* now copy all input parameters */