mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 15:02:50 +02:00
Possible Memory leak: tag
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@30 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: e29964bb20
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2009-12-08 (Tue, 08 Dec 2009)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -757,8 +757,10 @@ enum XML_Error XML_Parser::doContent(int startTagLevel, const ENCODING *enc, con
|
|||||||
if (!tag) return XML_ERROR_NO_MEMORY;
|
if (!tag) return XML_ERROR_NO_MEMORY;
|
||||||
|
|
||||||
tag->buf=new char[INIT_TAG_BUF_SIZE];
|
tag->buf=new char[INIT_TAG_BUF_SIZE];
|
||||||
if (!tag->buf) return XML_ERROR_NO_MEMORY;
|
if (!tag->buf){
|
||||||
|
delete tag;
|
||||||
|
return XML_ERROR_NO_MEMORY;
|
||||||
|
}
|
||||||
tag->bufEnd=tag->buf+INIT_TAG_BUF_SIZE;
|
tag->bufEnd=tag->buf+INIT_TAG_BUF_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -775,8 +777,10 @@ enum XML_Error XML_Parser::doContent(int startTagLevel, const ENCODING *enc, con
|
|||||||
int bufSize=ROUND_UP(tag->rawNameLength*4, sizeof(XML_Char));
|
int bufSize=ROUND_UP(tag->rawNameLength*4, sizeof(XML_Char));
|
||||||
|
|
||||||
tag->buf=(char *) realloc(tag->buf, bufSize);
|
tag->buf=(char *) realloc(tag->buf, bufSize);
|
||||||
if (!tag->buf) return XML_ERROR_NO_MEMORY;
|
if (!tag->buf){
|
||||||
|
delete tag;
|
||||||
|
return XML_ERROR_NO_MEMORY;
|
||||||
|
}
|
||||||
tag->bufEnd=tag->buf+bufSize;
|
tag->bufEnd=tag->buf+bufSize;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -812,8 +816,10 @@ enum XML_Error XML_Parser::doContent(int startTagLevel, const ENCODING *enc, con
|
|||||||
bufSize=(tag->bufEnd-tag->buf) << 1;
|
bufSize=(tag->bufEnd-tag->buf) << 1;
|
||||||
tag->buf=(char *) realloc(tag->buf, bufSize);
|
tag->buf=(char *) realloc(tag->buf, bufSize);
|
||||||
|
|
||||||
if (!tag->buf) return XML_ERROR_NO_MEMORY;
|
if (!tag->buf){
|
||||||
|
delete tag;
|
||||||
|
return XML_ERROR_NO_MEMORY;
|
||||||
|
}
|
||||||
tag->bufEnd=tag->buf+bufSize;
|
tag->bufEnd=tag->buf+bufSize;
|
||||||
|
|
||||||
if (nextPtr) tag->rawName=tag->buf;
|
if (nextPtr) tag->rawName=tag->buf;
|
||||||
|
Reference in New Issue
Block a user