=== modified file 'apt-pkg/cdrom.cc'
--- apt-pkg/cdrom.cc	2009-07-23 08:41:38 +0000
+++ apt-pkg/cdrom.cc	2010-01-02 09:46:08 +0000
@@ -255,6 +255,8 @@
 {
    // Get a list of all the inodes
    ino_t *Inodes = new ino_t[List.size()];
+   if (!Inodes)
+      return false;
    for (unsigned int I = 0; I != List.size(); I++)
    {
       struct stat Buf;
@@ -265,8 +267,10 @@
       Inodes[I] = Buf.st_ino;
    }
    
-   if (_error->PendingError() == true)
+   if (_error->PendingError() == true) {
+      delete[] Inodes;
       return false;
+   }
    
    // Look for dups
    for (unsigned int I = 0; I != List.size(); I++)
@@ -299,6 +303,7 @@
 	 List.erase(List.begin()+I);
    }
    
+   delete[] Inodes;
    return true;
 }
 									/*}}}*/

