]> code.delx.au - refind/blobdiff - refind/icns.c
TianoCore build support; new use_graphics_for refind.conf token
[refind] / refind / icns.c
index e4738e26486e3d5c807041928f956fda9b62dac4..f9be58be75f0a75adaf67db0df3118c7629390fe 100644 (file)
@@ -38,6 +38,7 @@
 #include "lib.h"
 #include "icns.h"
 #include "config.h"
+#include "../refind/screen.h"
 
 //
 // well-known icons
@@ -100,8 +101,10 @@ 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) {
+            FreePool(CutoutName);
             return Image;
+        }
         FreePool(CutoutName);
     } // while