diff --git a/repos/ports/ports/virtualbox5.hash b/repos/ports/ports/virtualbox5.hash index fd545b0f84..9fb306d8b1 100644 --- a/repos/ports/ports/virtualbox5.hash +++ b/repos/ports/ports/virtualbox5.hash @@ -1 +1 @@ -48495db3bf857e7d02ede435d53904ac5239d91d +1544b2568499a11bfd400f6bb1361e39f9f1022d diff --git a/repos/ports/src/virtualbox5/patches/mem_leak.patch b/repos/ports/src/virtualbox5/patches/mem_leak.patch new file mode 100644 index 0000000000..806dfb7d9a --- /dev/null +++ b/repos/ports/src/virtualbox5/patches/mem_leak.patch @@ -0,0 +1,43 @@ +--- a/src/app/virtualbox/src/VBox/Main/include/DisplayImpl.h ++++ b/src/app/virtualbox/src/VBox/Main/include/DisplayImpl.h +@@ -35,6 +35,7 @@ + + #define NEW_RESIZE + ++class DisplaySourceBitmap; + class Console; + struct VIDEORECCONTEXT; + +@@ -50,7 +51,7 @@ + + ComPtr pFramebuffer; + com::Guid framebufferId; +- ComPtr pSourceBitmap; ++ ComPtr pSourceBitmap; + bool fDisabled; + + uint32_t u32Caps; +--- a/src/app/virtualbox/src/VBox/Main/include/TokenImpl.h ++++ b/src/app/virtualbox/src/VBox/Main/include/TokenImpl.h +@@ -22,6 +22,7 @@ + + #include "TokenWrap.h" + #include "MachineImpl.h" ++#include "MediumImpl.h" + + + /** +--- a/src/app/virtualbox/src/VBox/Main/src-client/DisplayImpl.cpp ++++ b/src/app/virtualbox/src/VBox/Main/src-client/DisplayImpl.cpp +@@ -1071,6 +1073,11 @@ + pFBInfo->updateImage.cbLine = 0; + + /* Release the current source bitmap. */ ++ DisplaySourceBitmap *source_bitmap = *pFBInfo->pSourceBitmap.asOutParam(); ++ if (source_bitmap) { ++ source_bitmap->FinalRelease(); ++ delete source_bitmap; ++ } + pFBInfo->pSourceBitmap.setNull(); + + /* Update the video mode information. */ diff --git a/repos/ports/src/virtualbox5/patches/series b/repos/ports/src/virtualbox5/patches/series index 9865ca030f..955302538c 100644 --- a/repos/ports/src/virtualbox5/patches/series +++ b/repos/ports/src/virtualbox5/patches/series @@ -31,3 +31,4 @@ vmdk.patch tm_tpr.patch tm_4s.patch rem_tss.patch +mem_leak.patch