diff options
author | Robin Gareus <robin@gareus.org> | 2016-07-18 19:19:35 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-07-18 19:21:05 +0200 |
commit | c9959f742acc731360649abc8c15da9e044b931e (patch) | |
tree | c76f02ee7681a385c22c9c107fd69d93d2fc5bdb /gtk2_ardour/ardour_http.cc | |
parent | b8f5306d5bf59ddb237fabcdbab91a7d1e6fd612 (diff) |
clean up HttpGet
Diffstat (limited to 'gtk2_ardour/ardour_http.cc')
-rw-r--r-- | gtk2_ardour/ardour_http.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk2_ardour/ardour_http.cc b/gtk2_ardour/ardour_http.cc index 569c0e2197..3ffea61b33 100644 --- a/gtk2_ardour/ardour_http.cc +++ b/gtk2_ardour/ardour_http.cc @@ -141,7 +141,8 @@ HttpGet::~HttpGet () char* HttpGet::get (const char* url) { - if (!_curl) { + _status = _result = -1; + if (!_curl || !url) { return NULL; } @@ -151,7 +152,9 @@ HttpGet::get (const char* url) if (!persist) { free (mem.data); - } + } // otherwise caller is expected to have free()d or re-used it. + + mem.data = NULL; mem.size = 0; curl_easy_setopt (_curl, CURLOPT_URL, url); |