Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix possible memory leak in WebServer.cpp

  • Loading branch information...
commit c20b7e3566832dee495b16d1a64042f04d9ee79f 1 parent d23e851
Kyle Hill authored Kyle Hill committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 xbmc/network/WebServer.cpp
View
4 xbmc/network/WebServer.cpp
@@ -395,7 +395,11 @@ int CWebServer::CreateFileDownloadResponse(struct MHD_Connection *connection, co
&CWebServer::ContentReaderCallback, file,
&CWebServer::ContentReaderFreeCallback);
if (response == NULL)
+ {
+ file->Close();
+ delete file;
return MHD_NO;
+ }
}
else
{
Please sign in to comment.
Something went wrong with that request. Please try again.