]> git.saurik.com Git - apt.git/commitdiff
use free() instead of delete[] in debSrcRecordParser::~debSrcRecordParser
authorMichael Vogt <mvo@debian.org>
Tue, 27 May 2014 21:42:10 +0000 (23:42 +0200)
committerMichael Vogt <mvo@debian.org>
Tue, 27 May 2014 21:42:10 +0000 (23:42 +0200)
The Buffer was allocated using strndup() so we need to free it using
free() instead of delete[]

apt-pkg/deb/debsrcrecords.cc

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