Skip to content

Commit b4e5eab

Browse files
committed
trurl: fix a few returns codes for out of memory
1 parent 95edef9 commit b4e5eab

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

trurl.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -1748,13 +1748,13 @@ static void normalize_part(struct option *o, CURLU *uh, CURLUPart part)
17481748
/* First URL decode the component */
17491749
char *rawptr = curl_easy_unescape(NULL, ptr, (int)ptrlen, &olen);
17501750
if(!rawptr)
1751-
errorf(o, ERROR_ITER, "out of memory");
1751+
errorf(o, ERROR_MEM, "out of memory");
17521752

17531753
/* Then URL encode it again */
17541754
uptr = curl_easy_escape(NULL, rawptr, olen);
17551755
curl_free(rawptr);
17561756
if(!uptr)
1757-
errorf(o, ERROR_ITER, "out of memory");
1757+
errorf(o, ERROR_MEM, "out of memory");
17581758

17591759
if(strcmp(ptr, uptr))
17601760
/* changed, store the updated one */
@@ -1882,7 +1882,7 @@ static void singleurl(struct option *o,
18821882
char *cpath;
18831883
bool path_is_modified = false;
18841884
if(curl_url_get(uh, CURLUPART_PATH, &opath, 0))
1885-
errorf(o, ERROR_ITER, "out of memory");
1885+
errorf(o, ERROR_MEM, "out of memory");
18861886

18871887
/* append path segments */
18881888
for(p = o->append_path; p; p = p->next) {
@@ -1917,7 +1917,7 @@ static void singleurl(struct option *o,
19171917
if(path_is_modified) {
19181918
/* set the new path */
19191919
if(curl_url_set(uh, CURLUPART_PATH, opath, 0))
1920-
errorf(o, ERROR_ITER, "out of memory");
1920+
errorf(o, ERROR_MEM, "out of memory");
19211921
}
19221922
curl_free(opath);
19231923

0 commit comments

Comments
 (0)