mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
fix mem leak
Origin commit data
------------------
Branch: ni/coolstream
Commit: a7942c9987
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2017-09-18 (Mon, 18 Sep 2017)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -2080,18 +2080,21 @@ void CControlAPI::ScreenshotCGI(CyhookHandler *hh)
|
|||||||
if(!hh->ParamList["name"].empty())
|
if(!hh->ParamList["name"].empty())
|
||||||
filename = hh->ParamList["name"];
|
filename = hh->ParamList["name"];
|
||||||
|
|
||||||
CScreenShot * sc = new CScreenShot("/tmp/" + filename + ".png", (CScreenShot::screenshot_format_t)0 /*PNG*/);
|
CScreenShot * screenshot = new CScreenShot("/tmp/" + filename + ".png", (CScreenShot::screenshot_format_t)0 /*PNG*/);
|
||||||
sc->EnableOSD(enableOSD);
|
if(screenshot){
|
||||||
sc->EnableVideo(enableVideo);
|
screenshot->EnableOSD(enableOSD);
|
||||||
|
screenshot->EnableVideo(enableVideo);
|
||||||
#if 0
|
#if 0
|
||||||
sc->Start();
|
screenshot->Start();
|
||||||
hh->SendOk(); // FIXME what if sc->Start() failed?
|
hh->SendOk(); // FIXME what if screenshot->Start() failed?
|
||||||
#else
|
#else
|
||||||
if (sc->StartSync())
|
if (screenshot->StartSync())
|
||||||
hh->SendOk();
|
hh->SendOk();
|
||||||
else
|
else
|
||||||
hh->SendError();
|
hh->SendError();
|
||||||
#endif
|
#endif
|
||||||
|
delete screenshot;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user