[PATCH 2/7] Fix the case, when the device was removed before partition selection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 loader/driverdisk.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/loader/driverdisk.c b/loader/driverdisk.c
index f718684..074428e 100644
--- a/loader/driverdisk.c
+++ b/loader/driverdisk.c
@@ -404,6 +404,12 @@ int loadDriverFromMedia(int class, struct loaderData_s *loaderData,
             char ** part_list = getPartitionsList(device);
             int nump = 0, num = 0;
 
+            /* Do not crash if the device disappeared */
+            if(!part_list){
+              stage = DEV_DEVICE;
+              break;
+            }
+
             if (part != NULL) free(part);
 
             if ((nump = lenPartitionsList(part_list)) == 0) {
-- 
1.6.4.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux