From 50388094dfaa8d673707d7805e5899ad0478d240 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 16 Sep 2024 13:44:00 +0200 Subject: [PATCH] trurl: fix a few returns codes for out of memory --- trurl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/trurl.c b/trurl.c index a587f985..a0fdc652 100644 --- a/trurl.c +++ b/trurl.c @@ -1748,13 +1748,13 @@ static void normalize_part(struct option *o, CURLU *uh, CURLUPart part) /* First URL decode the component */ char *rawptr = curl_easy_unescape(NULL, ptr, (int)ptrlen, &olen); if(!rawptr) - errorf(o, ERROR_ITER, "out of memory"); + errorf(o, ERROR_MEM, "out of memory"); /* Then URL encode it again */ uptr = curl_easy_escape(NULL, rawptr, olen); curl_free(rawptr); if(!uptr) - errorf(o, ERROR_ITER, "out of memory"); + errorf(o, ERROR_MEM, "out of memory"); if(strcmp(ptr, uptr)) /* changed, store the updated one */ @@ -1882,7 +1882,7 @@ static void singleurl(struct option *o, char *cpath; bool path_is_modified = false; if(curl_url_get(uh, CURLUPART_PATH, &opath, 0)) - errorf(o, ERROR_ITER, "out of memory"); + errorf(o, ERROR_MEM, "out of memory"); /* append path segments */ for(p = o->append_path; p; p = p->next) { @@ -1917,7 +1917,7 @@ static void singleurl(struct option *o, if(path_is_modified) { /* set the new path */ if(curl_url_set(uh, CURLUPART_PATH, opath, 0)) - errorf(o, ERROR_ITER, "out of memory"); + errorf(o, ERROR_MEM, "out of memory"); } curl_free(opath);