mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
initializ variable: buffer, Possible Resource leak:fd
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@33 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -492,7 +492,7 @@ unsigned int CWebserverRequest::HandlePostBoundary(std::string boundary, unsigne
|
|||||||
|
|
||||||
// open file for write
|
// open file for write
|
||||||
int fd = open(upload_filename.c_str(), O_WRONLY|O_CREAT|O_TRUNC);
|
int fd = open(upload_filename.c_str(), O_WRONLY|O_CREAT|O_TRUNC);
|
||||||
if (fd<=0)
|
if (fd<0)
|
||||||
{
|
{
|
||||||
aprintf("cannot open file %s: ", upload_filename.c_str());
|
aprintf("cannot open file %s: ", upload_filename.c_str());
|
||||||
dperror("");
|
dperror("");
|
||||||
|
@@ -309,7 +309,7 @@ int CySocket::Send(char const *buffer, unsigned int length)
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
bool CySocket::CheckSocketOpen()
|
bool CySocket::CheckSocketOpen()
|
||||||
{
|
{
|
||||||
char buffer[32];
|
char buffer[32]={0};
|
||||||
|
|
||||||
#ifdef CONFIG_SYSTEM_CYGWIN
|
#ifdef CONFIG_SYSTEM_CYGWIN
|
||||||
return !(recv(sock, buffer, sizeof(buffer), MSG_PEEK | MSG_NOSIGNAL) == 0);
|
return !(recv(sock, buffer, sizeof(buffer), MSG_PEEK | MSG_NOSIGNAL) == 0);
|
||||||
|
Reference in New Issue
Block a user