summaryrefslogtreecommitdiff
blob: 5054ee1ad024798e03652ce5acbbb71ecc214a23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Fix double free crash: http://bugs.gentoo.org/392413

--- source/sckif.c
+++ source/sckif.c
@@ -39,6 +39,8 @@
 
 #include "split.h"
 
+#include "ropen.h" /* fshutdown */
+
 struct hash track;
 
 static int stcpsck = -1, sunixsck = -1;
@@ -191,9 +193,7 @@
 
 	if(disconnect) {
 		debug("removing client\n");
-		shutdown(SHUT_RDWR, client_socket);
-		close(client_socket);
-		fclose(fd);
+		fshutdown(& fd);
 
 		remove_handle(client_socket);
 	}