aqemu: Add memleak patch

Signed-off-by: Nathan Owens <ndowens04@gmail.com>
This commit is contained in:
Nathan Owens 2019-12-03 18:27:50 -06:00 committed by Helmut Pozimski
parent c703c6f86a
commit 016f845243
2 changed files with 70 additions and 2 deletions

View File

@ -0,0 +1,68 @@
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();

View File

@ -1,15 +1,15 @@
# Template file for 'aqemu'
pkgname=aqemu
version=0.9.2
revision=1
revision=2
build_style=cmake
configure_args="-DWITHOUT_EMBEDDED_DISPLAY=1"
makedepends="qt5-devel qemu desktop-file-utils"
depends="qemu desktop-file-utils"
short_desc="GUI to QEMU and KVM emulators, written in Qt4"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-only"
homepage="http://aqemu.sourceforge.net"
license="GPL-2"
distfiles="${SOURCEFORGE_SITE}/aqemu/${version}/aqemu-$version.tar.gz"
checksum=e3d54de00ebdce3754f97f7e0e7cce8cebb588e8ce6bc249401cc909281b08de