getinfo: return better error on NULL as first argument

Closes #9114
This commit is contained in:
xkernel 2022-07-10 18:22:23 +02:00 committed by Daniel Stenberg
parent bf7e887b24
commit afdbb176f6
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -578,7 +578,7 @@ CURLcode Curl_getinfo(struct Curl_easy *data, CURLINFO info, ...)
CURLcode result = CURLE_UNKNOWN_OPTION;
if(!data)
return result;
return CURLE_BAD_FUNCTION_ARGUMENT;
va_start(arg, info);