mirror of
https://github.com/curl/curl.git
synced 2026-06-05 10:04:17 +03:00
tidy-up: rename Curl_safefree()/tool_safefree() to curlx_safefree()
To sync names for the same macro logic between lib and src, and to move it to the curlx namespace, to match `curlx_free()` that it's calling. Closes #21151
This commit is contained in:
parent
2b3dfb4ad4
commit
0df6c01db3
72 changed files with 494 additions and 500 deletions
14
lib/smb.c
14
lib/smb.c
|
|
@ -376,7 +376,7 @@ static void smb_easy_dtor(void *key, size_t klen, void *entry)
|
|||
struct smb_request *req = entry;
|
||||
(void)key;
|
||||
(void)klen;
|
||||
Curl_safefree(req->path);
|
||||
curlx_safefree(req->path);
|
||||
curlx_free(req);
|
||||
}
|
||||
|
||||
|
|
@ -385,10 +385,10 @@ static void smb_conn_dtor(void *key, size_t klen, void *entry)
|
|||
struct smb_conn *smbc = entry;
|
||||
(void)key;
|
||||
(void)klen;
|
||||
Curl_safefree(smbc->share);
|
||||
Curl_safefree(smbc->domain);
|
||||
Curl_safefree(smbc->recv_buf);
|
||||
Curl_safefree(smbc->send_buf);
|
||||
curlx_safefree(smbc->share);
|
||||
curlx_safefree(smbc->domain);
|
||||
curlx_safefree(smbc->recv_buf);
|
||||
curlx_safefree(smbc->send_buf);
|
||||
curlx_free(smbc);
|
||||
}
|
||||
|
||||
|
|
@ -406,7 +406,7 @@ static CURLcode smb_parse_url_path(struct Curl_easy *data,
|
|||
return result;
|
||||
|
||||
/* Parse the path for the share */
|
||||
Curl_safefree(smbc->share);
|
||||
curlx_safefree(smbc->share);
|
||||
smbc->share = curlx_strdup((*path == '/' || *path == '\\')
|
||||
? path + 1 : path);
|
||||
curlx_free(path);
|
||||
|
|
@ -419,7 +419,7 @@ static CURLcode smb_parse_url_path(struct Curl_easy *data,
|
|||
|
||||
/* The share must be present */
|
||||
if(!slash) {
|
||||
Curl_safefree(smbc->share);
|
||||
curlx_safefree(smbc->share);
|
||||
failf(data, "missing share in URL path for SMB");
|
||||
return CURLE_URL_MALFORMAT;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue