浏览代码

Merge /u/xypron/gnu-efi/ branch misc_fixes into master

https://sourceforge.net/p/gnu-efi/code/merge-requests/25/
b'Nigel Croxon 3 年之前
父节点
当前提交
40160210a7
共有 3 个文件被更改,包括 4 次插入3 次删除
  1. 2 1
      apps/bltgrid.c
  2. 1 1
      apps/lfbgrid.c
  3. 1 1
      apps/modelist.c

+ 2 - 1
apps/bltgrid.c

@@ -46,7 +46,7 @@ draw_boxes(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop)
 		UINTN SizeOfInfo;
 		rc = uefi_call_wrapper(gop->QueryMode, 4, gop, i, &SizeOfInfo,
 					&info);
-		if (EFI_ERROR(rc) && rc == EFI_NOT_STARTED) {
+		if (rc == EFI_NOT_STARTED) {
 			Print(L"gop->QueryMode() returned %r\n", rc);
 			Print(L"Trying to start GOP with SetMode().\n");
 			rc = uefi_call_wrapper(gop->SetMode, 2, gop,
@@ -84,6 +84,7 @@ draw_boxes(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop)
 				  info->HorizontalResolution,
 				  info->VerticalResolution,
 				  0);
+		FreePool(PixelBuffer);
 		return;
 	}
 	Print(L"Never found the active video mode?\n");

+ 1 - 1
apps/lfbgrid.c

@@ -71,7 +71,7 @@ draw_boxes(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop)
 		UINTN SizeOfInfo;
 		rc = uefi_call_wrapper(gop->QueryMode, 4, gop, i, &SizeOfInfo,
 					&info);
-		if (EFI_ERROR(rc) && rc == EFI_NOT_STARTED) {
+		if (rc == EFI_NOT_STARTED) {
 			Print(L"gop->QueryMode() returned %r\n", rc);
 			Print(L"Trying to start GOP with SetMode().\n");
 			rc = uefi_call_wrapper(gop->SetMode, 2, gop,

+ 1 - 1
apps/modelist.c

@@ -22,7 +22,7 @@ print_modes(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop)
 		UINTN SizeOfInfo;
 		rc = uefi_call_wrapper(gop->QueryMode, 4, gop, i, &SizeOfInfo,
 					&info);
-		if (EFI_ERROR(rc) && rc == EFI_NOT_STARTED) {
+		if (rc == EFI_NOT_STARTED) {
 			Print(L"gop->QueryMode() returned %r\n", rc);
 			Print(L"Trying to start GOP with SetMode().\n");
 			rc = uefi_call_wrapper(gop->SetMode, 2, gop,