Przeglądaj źródła

* apt-pkg/cdrom.cc:
- fix crash in pkgUdevCdromDevices

Michael Vogt 16 lat temu
rodzic
commit
25ee65dd51
2 zmienionych plików z 4 dodań i 1 usunięć
  1. 2 1
      apt-pkg/cdrom.cc
  2. 2 0
      debian/changelog

+ 2 - 1
apt-pkg/cdrom.cc

@@ -921,6 +921,7 @@ pkgUdevCdromDevices::Scan()                                             /*{{{*/
 
 
 pkgUdevCdromDevices::~pkgUdevCdromDevices()                             /*{{{*/
 pkgUdevCdromDevices::~pkgUdevCdromDevices()                             /*{{{*/
 { 
 { 
-   dlclose(libudev_handle);
+   if (libudev_handle != NULL)
+      dlclose(libudev_handle);
 }
 }
 									/*}}}*/
 									/*}}}*/

+ 2 - 0
debian/changelog

@@ -8,6 +8,8 @@ apt (0.7.25.1) UNRELEASED; urgency=low
   * apt-pkg/contrib/cdromutl.cc:
   * apt-pkg/contrib/cdromutl.cc:
     - fix UnmountCdrom() fails, give it a bit more time and try
     - fix UnmountCdrom() fails, give it a bit more time and try
       the umount again
       the umount again
+  * apt-pkg/cdrom.cc:
+    - fix crash in pkgUdevCdromDevices
   * methods/cdrom.cc:
   * methods/cdrom.cc:
     - fixes in multi cdrom setup code
     - fixes in multi cdrom setup code
     - add new "Acquire::cdrom::AutoDetect" variable that enables/disables
     - add new "Acquire::cdrom::AutoDetect" variable that enables/disables