]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/debsrcrecords.cc
Merge branch 'debian/sid' into debian/experimental
[apt.git] / apt-pkg / deb / debsrcrecords.cc
index bf5e56ec9ee4dc8e98b78c93bbb23fcb92b53102..97f43aca2b54f8fda5210879a9dc6f4f2780824c 100644 (file)
@@ -57,12 +57,13 @@ const char **debSrcRecordParser::Binaries()
       char* binStartNext = strchrnul(bin, ',');
       char* binEnd = binStartNext - 1;
       for (; isspace(*binEnd) != 0; --binEnd)
-        binEnd = '\0';
+        binEnd = 0;
       StaticBinList.push_back(bin);
       if (*binStartNext != ',')
         break;
       *binStartNext = '\0';
-      for (bin = binStartNext + 1; isspace(*bin) != 0; ++bin);
+      for (bin = binStartNext + 1; isspace(*bin) != 0; ++bin)
+         ;
    } while (*bin != '\0');
    StaticBinList.push_back(NULL);
 
@@ -238,7 +239,8 @@ bool debSrcRecordParser::Files(std::vector<pkgSrcRecords::File> &List)
 /* */
 debSrcRecordParser::~debSrcRecordParser()
 {
-   delete[] Buffer;
+   // was allocated via strndup()
+   free(Buffer);
 }
                                                                        /*}}}*/