summaryrefslogtreecommitdiff
path: root/lib/pipeline.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/pipeline.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/pipeline.c')
-rw-r--r--lib/pipeline.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/pipeline.c b/lib/pipeline.c
index 2645fdb48..50df4adb2 100644
--- a/lib/pipeline.c
+++ b/lib/pipeline.c
@@ -6,7 +6,7 @@
* \___|\___/|_| \_\_____|
*
* Copyright (C) 2013, Linus Nielsen Feltzing, <linus@haxx.se>
- * Copyright (C) 2013-2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2013-2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -49,15 +49,13 @@ static void site_blacklist_llist_dtor(void *user, void *element)
(void)user;
Curl_safefree(entry->hostname);
- Curl_safefree(entry);
+ free(entry);
}
static void server_blacklist_llist_dtor(void *user, void *element)
{
- char *server_name = element;
(void)user;
-
- Curl_safefree(server_name);
+ free(element);
}
bool Curl_pipeline_penalized(struct SessionHandle *data,