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