aboutsummaryrefslogtreecommitdiff
path: root/lib/smb.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-03-16 15:01:15 +0100
committerDaniel Stenberg <daniel@haxx.se>2015-03-16 15:01:15 +0100
commit0f4a03cbb6fdb84d05cb6aafe50444edad4f4119 (patch)
tree89472eece4173a97ac3b80aba5e35ed70cdd7845 /lib/smb.c
parent9e661601feba03d1158ac466a457d5a6ce7f3f11 (diff)
free: instead of Curl_safefree()
Since we just started make use of free(NULL) in order to simplify code, this change takes it a step further and: - converts lots of Curl_safefree() calls to good old free() - makes Curl_safefree() not check the pointer before free() The (new) rule of thumb is: if you really want a function call that frees a pointer and then assigns it to NULL, then use Curl_safefree(). But we will prefer just using free() from now on.
Diffstat (limited to 'lib/smb.c')
-rw-r--r--lib/smb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/smb.c b/lib/smb.c
index e66427ba3..cb4d997a6 100644
--- a/lib/smb.c
+++ b/lib/smb.c
@@ -935,7 +935,7 @@ static CURLcode smb_parse_url_path(struct connectdata *conn)
/* Parse the path for the share */
req->share = strdup((*path == '/' || *path == '\\') ? path + 1 : path);
if(!req->share) {
- Curl_safefree(path);
+ free(path);
return CURLE_OUT_OF_MEMORY;
}
@@ -946,7 +946,7 @@ static CURLcode smb_parse_url_path(struct connectdata *conn)
/* The share must be present */
if(!slash) {
- Curl_safefree(path);
+ free(path);
return CURLE_URL_MALFORMAT;
}
@@ -960,7 +960,7 @@ static CURLcode smb_parse_url_path(struct connectdata *conn)
*slash = '\\';
}
- Curl_safefree(path);
+ free(path);
return CURLE_OK;
}