diff options
author | Michael Vogt <mvo@debian.org> | 2014-05-08 14:29:30 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2014-05-08 14:29:30 +0200 |
commit | 070536e61cb203a9c74013be2a26322b582a9674 (patch) | |
tree | 9126356edcc1e239c6d87e3cb2921318238d501b /apt-pkg/tagfile.cc | |
parent | 1816266852b25faec4f2ed1a67171eddb39b2102 (diff) | |
parent | 77da39b95870498431fc21df65900acc5ce2f7ea (diff) |
Merge remote-tracking branch 'mvo/feature/build-dep-dsc2' into debian/experimental
Conflicts:
apt-pkg/deb/debindexfile.cc
apt-pkg/deb/debindexfile.h
apt-pkg/deb/debsrcrecords.cc
Diffstat (limited to 'apt-pkg/tagfile.cc')
-rw-r--r-- | apt-pkg/tagfile.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index 91d176e3c..009ed7d74 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -51,12 +51,23 @@ public: // --------------------------------------------------------------------- /* */ pkgTagFile::pkgTagFile(FileFd *pFd,unsigned long long Size) + : d(NULL) +{ + Init(pFd, Size); +} + +void pkgTagFile::Init(FileFd *pFd,unsigned long long Size) { /* The size is increased by 4 because if we start with the Size of the filename we need to try to read 1 char more to see an EOF faster, 1 char the end-pointer can be on and maybe 2 newlines need to be added to the end of the file -> 4 extra chars */ Size += 4; + if(d != NULL) + { + free(d->Buffer); + delete d; + } d = new pkgTagFilePrivate(pFd, Size); if (d->Fd.IsOpen() == false) |