Blame SOURCES/libproxy-0.4.11-crash.patch

28fc30
diff -up libproxy-0.4.11/libproxy/extension_pacrunner.cpp.crash libproxy-0.4.11/libproxy/extension_pacrunner.cpp
28fc30
--- libproxy-0.4.11/libproxy/extension_pacrunner.cpp.crash	2010-07-29 08:14:59.000000000 -0400
28fc30
+++ libproxy-0.4.11/libproxy/extension_pacrunner.cpp	2013-11-11 15:23:56.987266457 -0500
28fc30
@@ -22,20 +22,10 @@ using namespace libproxy;
28fc30
 
28fc30
 pacrunner::pacrunner(string, const url&) {}
28fc30
 
28fc30
-pacrunner_extension::pacrunner_extension() {
28fc30
-	this->pr = NULL;
28fc30
-}
28fc30
+pacrunner_extension::pacrunner_extension() {}
28fc30
 
28fc30
-pacrunner_extension::~pacrunner_extension() {
28fc30
-	if (this->pr) delete this->pr;
28fc30
-}
28fc30
+pacrunner_extension::~pacrunner_extension() {}
28fc30
 
28fc30
 pacrunner* pacrunner_extension::get(string pac, const url& pacurl) throw (bad_alloc) {
28fc30
-	if (this->pr) {
28fc30
-		if (this->last == pac)
28fc30
-			return this->pr;
28fc30
-		delete this->pr;
28fc30
-	}
28fc30
-
28fc30
-	return this->pr = this->create(pac, pacurl);
28fc30
+	return this->create(pac, pacurl);
28fc30
 }
28fc30
diff -up libproxy-0.4.11/libproxy/proxy.cpp.crash libproxy-0.4.11/libproxy/proxy.cpp
28fc30
--- libproxy-0.4.11/libproxy/proxy.cpp.crash	2013-11-11 15:25:27.309271353 -0500
28fc30
+++ libproxy-0.4.11/libproxy/proxy.cpp	2013-11-11 15:25:31.569271584 -0500
28fc30
@@ -416,7 +416,9 @@ void proxy_factory::run_pac(url &realurl
28fc30
 
28fc30
 		/* Run the PAC, but only try one PACRunner */
28fc30
 		if (debug) cerr << "Using pacrunner: " << typeid(*pacrunners[0]).name() << endl;
28fc30
-		string pacresp = pacrunners[0]->get(this->pac, this->pacurl->to_string())->run(realurl);
28fc30
+		pacrunner* runner = pacrunners[0]->get(this->pac, this->pacurl->to_string());
28fc30
+		string pacresp = runner->run(realurl);
28fc30
+		delete runner;
28fc30
 		if (debug) cerr << "Pacrunner returned: " << pacresp << endl;
28fc30
 		format_pac_response(pacresp, response);
28fc30
 	}