lib: error for OOM when extracting URL query

Closes #19594
This commit is contained in:
Daniel Stenberg 2025-11-18 17:01:30 +01:00
parent 9726fc8259
commit 318cd4f2ee
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 7 additions and 3 deletions

View file

@ -1974,7 +1974,9 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data,
conn->remote_port = (unsigned short)port;
}
(void)curl_url_get(uh, CURLUPART_QUERY, &data->state.up.query, 0);
uc = curl_url_get(uh, CURLUPART_QUERY, &data->state.up.query, 0);
if(uc && (uc != CURLUE_NO_QUERY))
return CURLE_OUT_OF_MEMORY;
#ifdef USE_IPV6
if(data->set.scope_id)