From 7f48c4dfbb1f27c51044edde0692d7446ee74438 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 27 May 2014 23:42:10 +0200 Subject: 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[] --- apt-pkg/deb/debsrcrecords.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc index b09588dd3..a444cbe4d 100644 --- a/apt-pkg/deb/debsrcrecords.cc +++ b/apt-pkg/deb/debsrcrecords.cc @@ -186,6 +186,7 @@ bool debSrcRecordParser::Files(std::vector &List) /* */ debSrcRecordParser::~debSrcRecordParser() { - delete[] Buffer; + // was allocated via strndup() + free(Buffer); } /*}}}*/ -- cgit v1.2.3