summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/lib/getinfo.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-12-05 16:50:43 (GMT)
committerBrad King <brad.king@kitware.com>2016-12-05 16:50:43 (GMT)
commitf8a1ba202f51e70510f12f46fe0633ea908d5144 (patch)
treefe7f931cdb5c0049cd97660e3888a816dfd4a86f /Utilities/cmcurl/lib/getinfo.c
parent25d7b1ca9d3a160850ad1f147ff96ac7c55f7d9f (diff)
parent93cc249f3dd7ecd621cd063e4c08bbdb54d971e8 (diff)
downloadCMake-f8a1ba202f51e70510f12f46fe0633ea908d5144.zip
CMake-f8a1ba202f51e70510f12f46fe0633ea908d5144.tar.gz
CMake-f8a1ba202f51e70510f12f46fe0633ea908d5144.tar.bz2
Merge branch 'upstream-curl' into update-curl
* upstream-curl: curl 2016-11-02 (3c561c65)
Diffstat (limited to 'Utilities/cmcurl/lib/getinfo.c')
-rw-r--r--Utilities/cmcurl/lib/getinfo.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/Utilities/cmcurl/lib/getinfo.c b/Utilities/cmcurl/lib/getinfo.c
index 262cd93..9641d79 100644
--- a/Utilities/cmcurl/lib/getinfo.c
+++ b/Utilities/cmcurl/lib/getinfo.c
@@ -36,8 +36,8 @@
#include "memdebug.h"
/*
- * This is supposed to be called in the beginning of a perform() session
- * and should reset all session-info variables
+ * This is supposed to be called in the beginning of a perform() session and
+ * in curl_easy_reset() and should reset all session-info variables.
*/
CURLcode Curl_initinfo(struct Curl_easy *data)
{
@@ -58,18 +58,27 @@ CURLcode Curl_initinfo(struct Curl_easy *data)
info->filetime = -1; /* -1 is an illegal time and thus means unknown */
info->timecond = FALSE;
- free(info->contenttype);
- info->contenttype = NULL;
-
info->header_size = 0;
info->request_size = 0;
+ info->proxyauthavail = 0;
+ info->httpauthavail = 0;
info->numconnects = 0;
+ free(info->contenttype);
+ info->contenttype = NULL;
+
+ free(info->wouldredirect);
+ info->wouldredirect = NULL;
+
info->conn_primary_ip[0] = '\0';
info->conn_local_ip[0] = '\0';
info->conn_primary_port = 0;
info->conn_local_port = 0;
+#ifdef USE_SSL
+ Curl_ssl_free_certinfo(data);
+#endif
+
return CURLE_OK;
}