Module Name:    src
Committed By:   pooka
Date:           Wed Jan 26 14:42:41 UTC 2011

Modified Files:
        src/lib/librumpclient: rumpclient.c

Log Message:
plug fd leak in reconnect code


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/lib/librumpclient/rumpclient.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librumpclient/rumpclient.c
diff -u src/lib/librumpclient/rumpclient.c:1.18 src/lib/librumpclient/rumpclient.c:1.19
--- src/lib/librumpclient/rumpclient.c:1.18	Mon Jan 24 17:47:51 2011
+++ src/lib/librumpclient/rumpclient.c	Wed Jan 26 14:42:41 2011
@@ -1,4 +1,4 @@
-/*      $NetBSD: rumpclient.c,v 1.18 2011/01/24 17:47:51 pooka Exp $	*/
+/*      $NetBSD: rumpclient.c,v 1.19 2011/01/26 14:42:41 pooka Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -489,6 +489,7 @@
 	if (kq != -1)
 		host_close(kq);
 	kq = -1;
+	s = -1;
 
 	prevreconmsg = 0;
 	reconretries = 0;
@@ -497,6 +498,9 @@
 	if (clispc.spc_fd != -1)
 		host_close(clispc.spc_fd);
 	clispc.spc_fd = -1;
+	if (s != -1)
+		close(s);
+	s = -1;
 
 	/*
 	 * for reconnect, gate everyone out of the receiver code

Reply via email to