Fixed memory leak
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -299,7 +299,8 @@ bool wxHTTP::Abort(void)
|
|||||||
|
|
||||||
wxInputStream *wxHTTP::GetInputStream(const wxString& path)
|
wxInputStream *wxHTTP::GetInputStream(const wxString& path)
|
||||||
{
|
{
|
||||||
wxHTTPStream *inp_stream = new wxHTTPStream(this);
|
wxHTTPStream *inp_stream;
|
||||||
|
|
||||||
wxString new_path;
|
wxString new_path;
|
||||||
|
|
||||||
m_perr = wxPROTO_CONNERR;
|
m_perr = wxPROTO_CONNERR;
|
||||||
@@ -313,6 +314,8 @@ wxInputStream *wxHTTP::GetInputStream(const wxString& path)
|
|||||||
if (!BuildRequest(path, wxHTTP_GET))
|
if (!BuildRequest(path, wxHTTP_GET))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
inp_stream = new wxHTTPStream(this);
|
||||||
|
|
||||||
if (!GetHeader(wxT("Content-Length")).IsEmpty())
|
if (!GetHeader(wxT("Content-Length")).IsEmpty())
|
||||||
inp_stream->m_httpsize = wxAtoi(WXSTRINGCAST GetHeader(wxT("Content-Length")));
|
inp_stream->m_httpsize = wxAtoi(WXSTRINGCAST GetHeader(wxT("Content-Length")));
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user