diff options
author | Jay Satiro <raysatiro@yahoo.com> | 2016-11-05 23:05:52 -0400 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2016-11-05 23:06:28 -0400 |
commit | 4564636781cbb1f8735bc636ff8ba1719ad10ace (patch) | |
tree | d07d7bee392ac22c7285aad27f6c23090b957717 /lib/getinfo.c | |
parent | ebeffe81d8f5bb431c2e1c3968c48f28b7d06869 (diff) | |
download | curl-4564636781cbb1f8735bc636ff8ba1719ad10ace.tar.gz |
easy: Initialize info variables on easy init and duphandle
- Call Curl_initinfo on init and duphandle.
Prior to this change the statistical and informational variables were
simply zeroed by calloc on easy init and duphandle. While zero is the
correct default value for almost all info variables, there is one where
it isn't (filetime initializes to -1).
Bug: https://github.com/curl/curl/issues/1103
Reported-by: Neal Poole
Diffstat (limited to 'lib/getinfo.c')
-rw-r--r-- | lib/getinfo.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/getinfo.c b/lib/getinfo.c index 9641d79dc..3186d8ac5 100644 --- a/lib/getinfo.c +++ b/lib/getinfo.c @@ -36,8 +36,11 @@ #include "memdebug.h" /* - * 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. + * Initialize statistical and informational data. + * + * This function is called in curl_easy_reset, curl_easy_duphandle and at the + * beginning of a perform session. It must reset the session-info variables, + * in particular all variables in struct PureInfo. */ CURLcode Curl_initinfo(struct Curl_easy *data) { |