Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > b2e3ac505bd14bf924e2c9becacc2082 > files > 4

kpowersave-0.7.2-16mdv2008.0.src.rpm

--- kpowersave-0.7.2/src/inactivity.cpp--	2007-03-26 17:10:06.000000000 +0200
+++ kpowersave-0.7.2/src/inactivity.cpp	2007-03-26 17:11:30.000000000 +0200
@@ -60,6 +60,7 @@
 /*! The default destructor of the class autosuspend */
 inactivity::~inactivity() {
 	myDebug ("inactivity::~inactivity");
+	delete proc;
 }
 
 /*!
@@ -253,9 +253,12 @@
 		 SLOT(getPIDsExited(KProcess *)));
 	
 	if (!proc->start(KProcess::NotifyOnExit, KProcess::AllOutput))
+	{
+		delete proc;
 		emit displayErrorMsg(i18n("Could not start 'pidof'. "
 					  "Could not autosuspend the machine.\n"
 					  "Please check your installation."));
+	}
  
 	pidof_call_started = true;
 	pidof_call_returned = false;