summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/lib/fileinfo.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-06-14 15:03:53 (GMT)
committerBrad King <brad.king@kitware.com>2017-06-14 15:10:22 (GMT)
commita3ef36f153f51c33ea2154cff17bbf9abb7ee073 (patch)
tree94283929f1d08444c255a490d10810d7c5df0e04 /Utilities/cmcurl/lib/fileinfo.c
parent91101f108d68e8fe98c378f06e1ed12a513151fe (diff)
parent06d6d6c4aee149cd6560b919ef6935ef0867d921 (diff)
downloadCMake-a3ef36f153f51c33ea2154cff17bbf9abb7ee073.zip
CMake-a3ef36f153f51c33ea2154cff17bbf9abb7ee073.tar.gz
CMake-a3ef36f153f51c33ea2154cff17bbf9abb7ee073.tar.bz2
Merge branch 'upstream-curl' into update-curl
* upstream-curl: curl 2017-06-14 (54b636f1) Resolve a logical conflict in `Utilities/cmcurl/CMakeLists.txt` by disabling CA bundle/path detection for build within CMake. CMake already handles locating a CA bundle/path at runtime.
Diffstat (limited to 'Utilities/cmcurl/lib/fileinfo.c')
-rw-r--r--Utilities/cmcurl/lib/fileinfo.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/Utilities/cmcurl/lib/fileinfo.c b/Utilities/cmcurl/lib/fileinfo.c
index 144c65b..3872988 100644
--- a/Utilities/cmcurl/lib/fileinfo.c
+++ b/Utilities/cmcurl/lib/fileinfo.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2010 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2010 - 2017, 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
@@ -28,23 +28,19 @@
/* The last #include file should be: */
#include "memdebug.h"
-struct curl_fileinfo *Curl_fileinfo_alloc(void)
+struct fileinfo *Curl_fileinfo_alloc(void)
{
- struct curl_fileinfo *tmp = malloc(sizeof(struct curl_fileinfo));
- if(!tmp)
- return NULL;
- memset(tmp, 0, sizeof(struct curl_fileinfo));
- return tmp;
+ return calloc(1, sizeof(struct fileinfo));
}
void Curl_fileinfo_dtor(void *user, void *element)
{
- struct curl_fileinfo *finfo = element;
+ struct fileinfo *finfo = element;
(void) user;
if(!finfo)
return;
- Curl_safefree(finfo->b_data);
+ Curl_safefree(finfo->info.b_data);
free(finfo);
}