tidy-up: use curlx_safefree()

Closes #21700
This commit is contained in:
Viktor Szakats 2026-05-20 20:43:59 +02:00
parent d3b04e5600
commit bcd0497c81
No known key found for this signature in database
19 changed files with 41 additions and 80 deletions

View file

@ -3655,8 +3655,7 @@ static void ftp_done_path(struct Curl_easy *data, struct ftp_conn *ftpc,
* the error path) */
ftpc->ctl_valid = FALSE; /* mark control connection as bad */
connclose(conn, "FTP: out of memory!"); /* mark for connection closure */
curlx_free(ftpc->prevpath);
ftpc->prevpath = NULL; /* no path remembering */
curlx_safefree(ftpc->prevpath); /* no path remembering */
}
else { /* remember working directory for connection reuse */
const char *rawPath = ftpc->rawpath;