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[]
debian/1.8.y
Michael Vogt 8 years ago
parent
commit
7f48c4dfbb
  1. 3
      apt-pkg/deb/debsrcrecords.cc

3
apt-pkg/deb/debsrcrecords.cc

@ -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