summaryrefslogtreecommitdiff
path: root/ftparchive/contents.h
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-05-27 16:25:43 +0200
committerMichael Vogt <mvo@debian.org>2014-05-27 16:25:43 +0200
commit21ea1dbb50176a89e7f456f9b31220ff3097fdf2 (patch)
treef536b7ad06a46286b21a93254524af2da4e801bf /ftparchive/contents.h
parent9518b448743e9030d854fcbb104516dd5ba648f6 (diff)
use free() instead of delete() when realloc is used
ContentsExtract::~ContentsExtract() needs to use free() because Data got allocated via realloc() Reported-By: clang -fsanitize=address -fno-omit-frame-pointer
Diffstat (limited to 'ftparchive/contents.h')
-rw-r--r--ftparchive/contents.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/ftparchive/contents.h b/ftparchive/contents.h
index dbbb83350..f58e3278e 100644
--- a/ftparchive/contents.h
+++ b/ftparchive/contents.h
@@ -85,8 +85,8 @@ class ContentsExtract : public pkgDirStream
bool TakeContents(const void *Data,unsigned long long Length);
void Add(GenContents &Contents,std::string const &Package);
- ContentsExtract() : Data(0), MaxSize(0), CurSize(0) {};
- virtual ~ContentsExtract() {delete [] Data;};
+ ContentsExtract();
+ virtual ~ContentsExtract();
};
#endif