56b5a66393
- Fix file descriptor leak (#911066) - Fix crash when pacrunner fails (probably because of EMFILE...) (#998232)
21 lines
479 B
Diff
21 lines
479 B
Diff
diff -up libproxy-0.4.11/libproxy/url.cpp.fdleak libproxy-0.4.11/libproxy/url.cpp
|
|
--- libproxy-0.4.11/libproxy/url.cpp.fdleak 2013-09-19 08:45:48.718145364 -0400
|
|
+++ libproxy-0.4.11/libproxy/url.cpp 2013-09-19 08:46:31.374147676 -0400
|
|
@@ -403,6 +403,7 @@ char* url::get_pac() {
|
|
buffer = NULL;
|
|
}
|
|
}
|
|
+ close (sock);
|
|
return buffer;
|
|
}
|
|
|
|
@@ -495,7 +496,7 @@ char* url::get_pac() {
|
|
}
|
|
|
|
// Clean up
|
|
- shutdown(sock, SHUT_RDWR);
|
|
+ close(sock);
|
|
return buffer;
|
|
}
|
|
|