From efd283ae1eb1af0fedde0b4d583a20e16bf9bd28 Mon Sep 17 00:00:00 2001 From: satbaby Date: Wed, 20 Jan 2010 18:54:51 +0000 Subject: [PATCH] fix errors git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@195 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/movieinfo.cpp | 3 +++ src/gui/ringbuffer.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/movieinfo.cpp b/src/gui/movieinfo.cpp index 1b1d168b8..ed87bbdd8 100644 --- a/src/gui/movieinfo.cpp +++ b/src/gui/movieinfo.cpp @@ -341,11 +341,13 @@ bool CMovieInfo::parseXmlTree(char */*text*/, MI_MOVIE_INFO * /*movie_info*/) XMLTreeNode *root = parser->RootNode(); if (!root) { TRACE(" root error \r\n"); + delete parser; return (false); } if (strcmp(root->GetType(), MI_XML_TAG_NEUTRINO)) { TRACE("not neutrino file. %s", root->GetType()); + delete parser; return (false); } @@ -922,6 +924,7 @@ bool CMovieInfo::loadFile_std(CFile & file, char *buffer, int buffer_size) if (bytes <= 0) // cannot read file into buffer, return!!!! { TRACE("[mi] loadXml: cannot read (%s)\r\n", file.getFileName().c_str()); + close(fd); return false; } close(fd); diff --git a/src/gui/ringbuffer.c b/src/gui/ringbuffer.c index 7e12cf76d..8d5354f7b 100755 --- a/src/gui/ringbuffer.c +++ b/src/gui/ringbuffer.c @@ -32,7 +32,7 @@ ringbuffer_t * ringbuffer_create (int sz) { int power_of_two; - ringbuffer_t *rb; + ringbuffer_t *rb = NULL; rb = malloc (sizeof (ringbuffer_t));