]> git.saurik.com Git - apt.git/commitdiff
Corrections for object lifetime
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:59:05 +0000 (16:59 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:59:05 +0000 (16:59 +0000)
Author: jgg
Date: 2002-04-18 05:09:38 GMT
Corrections for object lifetime

methods/http.cc
methods/http.h

index 6e989102b8fdc159d050eb78fc6b6c47dc62409e..4521197edaa24ee654f413e64846c925e4454fb2 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: http.cc,v 1.53 2001/07/01 20:49:09 jgg Exp $
+// $Id: http.cc,v 1.54 2002/04/18 05:09:38 jgg Exp $
 /* ######################################################################
 
    HTTP Aquire Method - This is the HTTP aquire method for APT.
@@ -1142,6 +1142,9 @@ int HttpMethod::Loop()
         // Hard internal error, kill the connection and fail
         case 5:
         {
+           delete File;
+           File = 0;
+
            Fail();
            RotateDNS();
            Server->Close();
@@ -1179,3 +1182,5 @@ int main()
    
    return Mth.Loop();
 }
+
+
index f5899410bf8635849f0378f4b03621f964846ed7..c5a4d0e86a1f9967ed2f573eb9bb508b95646dd4 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
-// Description                                                         /*{{{*/// $Id: http.h,v 1.11 2001/05/27 23:53:56 jgg Exp $
-// $Id: http.h,v 1.11 2001/05/27 23:53:56 jgg Exp $
+// Description                                                         /*{{{*/// $Id: http.h,v 1.12 2002/04/18 05:09:38 jgg Exp $
+// $Id: http.h,v 1.12 2002/04/18 05:09:38 jgg Exp $
 /* ######################################################################
 
    HTTP Aquire Method - This is the HTTP aquire method for APT.
@@ -75,7 +75,7 @@ class CircleBuf
    void Stats();
 
    CircleBuf(unsigned long Size);
-   ~CircleBuf() {delete [] Buf;};
+   ~CircleBuf() {delete [] Buf; delete Hash;};
 };
 
 struct ServerState