@@ 1083,6 1083,7 @@ Xscreenshot_efi() {
BS->LocateHandleBuffer(ByProtocol, &gop_guid, NULL, &nhandles, &handles);
BS->HandleProtocol(handles[1], &gop_guid, (void **)&second_gop);
+ BS->FreePool(handles);
gopi = second_gop->Mode->Info;
picsize = gopi->VerticalResolution * gopi->PixelsPerScanLine * 4;
BS->AllocatePool(EfiLoaderData, picsize, &pixels);
@@ 1091,6 1092,7 @@ Xscreenshot_efi() {
BS->LocateHandleBuffer(ByProtocol, &fs_guid, NULL, &nhandles, &handles);
BS->HandleProtocol(handles[0], &fs_guid, (void **)&IOVolume);
+ BS->FreePool(handles);
IOVolume->OpenVolume(IOVolume, &Volume);
Volume->Open(Volume, &FileHandle, FileName, EFI_FILE_MODE_CREATE | EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE, 0);
FileHandle->Write(FileHandle, &picsize, pixels);