]> code.delx.au - refind/blobdiff - refind/driver_support.c
Fixed bug that caused volume icons to be read only from default icons
[refind] / refind / driver_support.c
index 4780dae17a11711811539645e4fe1ae22643660c..a547d654d25e6f2b9fc3f08f9234b3191a1cdfcd 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 #include "driver_support.h"
+#include "lib.h"
 #include "../include/refit_call_wrapper.h"
 
 #ifdef __MAKEWITH_GNUEFI
@@ -228,24 +229,19 @@ LibScanHandleDatabase (
             }
           }
 
-          FreePool (OpenInfo);
+          MyFreePool (OpenInfo);
         }
       }
 
-      FreePool (ProtocolGuidArray);
+      MyFreePool (ProtocolGuidArray);
     }
   }
 
   return EFI_SUCCESS;
 
 Error:
-  if (*HandleType != NULL) {
-    FreePool (*HandleType);
-  }
-
-  if (*HandleBuffer != NULL) {
-    FreePool (*HandleBuffer);
-  }
+  MyFreePool (*HandleType);
+  MyFreePool (*HandleBuffer);
 
   *HandleCount  = 0;
   *HandleBuffer = NULL;