summaryrefslogtreecommitdiff
path: root/lib/netrc.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/netrc.c
parent9e661601feba03d1158ac466a457d5a6ce7f3f11 (diff)
downloadcurl-0f4a03cbb6fdb84d05cb6aafe50444edad4f4119.tar.gz
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/netrc.c')
-rw-r--r--lib/netrc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/netrc.c b/lib/netrc.c
index 45a36e49a..dbe79d3dd 100644
--- a/lib/netrc.c
+++ b/lib/netrc.c
@@ -102,7 +102,7 @@ int Curl_parsenetrc(const char *host,
netrcfile = curl_maprintf("%s%s%s", home, DIR_CHAR, NETRC);
if(home_alloc)
- Curl_safefree(home);
+ free(home);
if(!netrcfile) {
return -1;
}
@@ -111,7 +111,7 @@ int Curl_parsenetrc(const char *host,
file = fopen(netrcfile, "r");
if(netrc_alloc)
- Curl_safefree(netrcfile);
+ free(netrcfile);
if(file) {
char *tok;
char *tok_buf;