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/url.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/url.c')
-rw-r--r-- | lib/url.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -92,6 +92,7 @@ bool curl_win32_idn_to_ascii(const char *in, char **out); #include "warnless.h" #include "non-ascii.h" #include "inet_pton.h" +#include "getinfo.h" /* And now for the protocols */ #include "ftp.h" @@ -646,6 +647,8 @@ CURLcode Curl_open(struct Curl_easy **curl) Curl_convert_init(data); + Curl_initinfo(data); + /* most recent connection is not yet defined */ data->state.lastconnect = NULL; |