void-packages/srcpkgs/aqemu/patches/memory-leak.patch
Nathan Owens 016f845243 aqemu: Add memleak patch
Signed-off-by: Nathan Owens <ndowens04@gmail.com>
2019-12-04 10:25:29 +01:00

68 lines
1.9 KiB
Diff

From c031cf9ba4023b2026e5680ddcd0daeca5e6b842 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tobias=20Gl=C3=A4=C3=9Fer?= <tobimensch@yahoo.de>
Date: Tue, 14 Jun 2016 20:25:24 +0200
Subject: [PATCH] Small memory leak fixes.
---
src/HDD_Image_Info.cpp | 5 +++++
src/HDD_Image_Info.h | 1 +
src/Properties_Window.cpp | 5 +++++
src/Properties_Window.h | 1 +
4 files changed, 12 insertions(+)
diff --git src/HDD_Image_Info.cpp src/HDD_Image_Info.cpp
index 4cd34b4..9d29c88 100644
--- src/HDD_Image_Info.cpp
+++ src/HDD_Image_Info.cpp
@@ -32,6 +32,11 @@ HDD_Image_Info::HDD_Image_Info( QObject *parent )
QEMU_IMG_Proc = new QProcess( this );
}
+HDD_Image_Info::~HDD_Image_Info()
+{
+ delete QEMU_IMG_Proc;
+}
+
VM::Disk_Info HDD_Image_Info::Get_Disk_Info() const
{
return Info;
diff --git src/HDD_Image_Info.h src/HDD_Image_Info.h
index 2cfec47..9339464 100644
--- src/HDD_Image_Info.h
+++ src/HDD_Image_Info.h
@@ -32,6 +32,7 @@ class HDD_Image_Info : public QObject
public:
HDD_Image_Info( QObject *parent = 0 );
+ ~HDD_Image_Info();
VM::Disk_Info Get_Disk_Info() const;
public slots:
diff --git src/Properties_Window.cpp src/Properties_Window.cpp
index 918251f..48d9619 100644
--- src/Properties_Window.cpp
+++ src/Properties_Window.cpp
@@ -47,6 +47,11 @@ Properties_Window::Properties_Window( QWidget *parent )
this, SLOT(on_Button_Update_Info_clicked()) );
}
+Properties_Window::~Properties_Window()
+{
+ delete HDD_Info;
+}
+
const VM_Storage_Device &Properties_Window::Get_Floppy()
{
PW_Storage.Set_Enabled( true );
diff --git src/Properties_Window.h src/Properties_Window.h
index 75ecbc1..bb9f692 100644
--- src/Properties_Window.h
+++ src/Properties_Window.h
@@ -33,6 +33,7 @@ class Properties_Window: public QDialog
public:
Properties_Window( QWidget *parent = 0 );
+ ~Properties_Window();
const VM_Storage_Device &Get_Floppy();
const VM_Storage_Device &Get_CD_ROM();