[PATCH rhel6-branch] Prevent SIGSEGV when going back after driver source selection (#718901)

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

 



From: Yoshihide Sonoda <yoshihide.sonoda.ua@xxxxxxxxxxx>

Resolves: rhbz#718901

Similar existing patch for updates image:
commit 4ac488330723ba9a60d668a0b9948bbb93268dae
---
 loader/driverdisk.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/loader/driverdisk.c b/loader/driverdisk.c
index 97aecd1..e6a37a5 100644
--- a/loader/driverdisk.c
+++ b/loader/driverdisk.c
@@ -405,6 +405,7 @@ int loadDriverFromMedia(int class, struct loaderData_s *loaderData,
             if (rc == 1) {
                 device = strdup(devNames[0]);
                 free(devNames);
+                devNames = NULL;
                 if (dir == -1)
                     return LOADER_BACK;
                 
@@ -424,18 +425,22 @@ int loadDriverFromMedia(int class, struct loaderData_s *loaderData,
 
             if (rc == 2) {
                 free(devNames);
+                devNames = NULL;
                 return LOADER_BACK;
             }
             device = strdup(devNames[num]);
             free(devNames);
+            devNames = NULL;
 
             stage = DEV_PART;
         case DEV_PART: {
             char ** part_list = getPartitionsList(device);
             int nump = 0, num = 0;
 
-            if (part != NULL)
+            if (part != NULL) {
                 free(part);
+                part = NULL;
+            }
 
             if ((nump = lenPartitionsList(part_list)) == 0) {
                 if (dir == -1)
-- 
1.7.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