From: Christian Schmitz Date: Sat, 4 May 2024 09:44:02 +0000 (+0200) Subject: dynbuf: Fix returncode on memory error X-Git-Tag: curl-8_8_0~129 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=62e45ce9cda0a04616a159b0d515cad8f10f1838;p=thirdparty%2Fcurl.git dynbuf: Fix returncode on memory error Curl_dyn_vaddf should return a proper error code in case allocating memory failed. Closes: #13533 Author: Christian Schmitz Reviewed-by: Daniel Gustafsson --- diff --git a/lib/dynbuf.c b/lib/dynbuf.c index a4c599d10c..3b62eaf8a4 100644 --- a/lib/dynbuf.c +++ b/lib/dynbuf.c @@ -213,7 +213,7 @@ CURLcode Curl_dyn_vaddf(struct dynbuf *s, const char *fmt, va_list ap) } /* If we failed, we cleanup the whole buffer and return error */ Curl_dyn_free(s); - return CURLE_OK; + return CURLE_OUT_OF_MEMORY; #endif }