summaryrefslogtreecommitdiff
path: root/libsi/si.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-10-15 12:03:31 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2012-10-15 12:03:31 +0200
commit41490539357a764d5e4aaca0a84e5800d9ef4da9 (patch)
tree465a34a18775daabaddc6681566ba5a5d1afaeb0 /libsi/si.h
parent15bb8ca60db165833441e44da6d8861e9a7df0ad (diff)
downloadvdr-41490539357a764d5e4aaca0a84e5800d9ef4da9.tar.gz
vdr-41490539357a764d5e4aaca0a84e5800d9ef4da9.tar.bz2
Fixed a possible memory leak in SI::StructureLoop::getNextAsPointer()
Diffstat (limited to 'libsi/si.h')
-rw-r--r--libsi/si.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/libsi/si.h b/libsi/si.h
index 4dccdd80..8e4255e3 100644
--- a/libsi/si.h
+++ b/libsi/si.h
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: si.h 2.5 2012/01/11 11:35:17 kls Exp $
+ * $Id: si.h 2.6 2012/10/15 11:56:06 kls Exp $
* *
***************************************************************************/
@@ -347,8 +347,10 @@ public:
T *ret=new T();
ret->setData(d);
ret->CheckParse();
- if (!checkSize(ret->getLength()))
+ if (!checkSize(ret->getLength())) {
+ delete ret;
return 0;
+ }
it.i+=ret->getLength();
return ret;
}