Browse Source

use free() instead of delete[] in debSrcRecordParser::~debSrcRecordParser

The Buffer was allocated using strndup() so we need to free it using
free() instead of delete[]
tags/debian/1.0.4
Michael Vogt 7 years ago
parent
commit
7f48c4dfbb
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      apt-pkg/deb/debsrcrecords.cc

+ 2
- 1
apt-pkg/deb/debsrcrecords.cc View File

@@ -186,6 +186,7 @@ bool debSrcRecordParser::Files(std::vector<pkgSrcRecords::File> &List)
/* */
debSrcRecordParser::~debSrcRecordParser()
{
delete[] Buffer;
// was allocated via strndup()
free(Buffer);
}
/*}}}*/

Loading…
Cancel
Save