]> code.delx.au - refind/blobdiff - refind/icns.c
Version 0.4.6 release, with UEFI legacy boot support.
[refind] / refind / icns.c
index e4738e26486e3d5c807041928f956fda9b62dac4..df469ef12d4e8e24c63ee216eff4ecb21b824a33 100644 (file)
@@ -38,6 +38,7 @@
 #include "lib.h"
 #include "icns.h"
 #include "config.h"
+#include "../refind/screen.h"
 
 //
 // well-known icons
@@ -100,9 +101,11 @@ EG_IMAGE * LoadOSIcon(IN CHAR16 *OSIconName OPTIONAL, IN CHAR16 *FallbackIconNam
 
         // try to load it
         Image = egLoadIcon(SelfDir, FileName, 128);
-        if (Image != NULL)
+        if (Image != NULL) {
+            MyFreePool(CutoutName);
             return Image;
-        FreePool(CutoutName);
+        }
+        MyFreePool(CutoutName);
     } // while
 
     // try the fallback name