Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Apr 2013 07:28:12 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r316222 - head/comms/zmtx-zmrx/files
Message-ID:  <201304220728.r3M7SCnf044645@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Mon Apr 22 07:28:11 2013
New Revision: 316222
URL: http://svnweb.freebsd.org/changeset/ports/316222

Log:
  Fix double fclose() when local file exists in receive_file().
  
  Submitted by:	Andy Xie (andy.xie.sz@gmail.com)
  Approved by:	delphij (maintainer, implicit)
  Feature safe:	yes

Modified:
  head/comms/zmtx-zmrx/files/patch-zmrx.c

Modified: head/comms/zmtx-zmrx/files/patch-zmrx.c
==============================================================================
--- head/comms/zmtx-zmrx/files/patch-zmrx.c	Sun Apr 21 23:02:58 2013	(r316221)
+++ head/comms/zmtx-zmrx/files/patch-zmrx.c	Mon Apr 22 07:28:11 2013	(r316222)
@@ -26,7 +26,15 @@
  	}
  
  	sscanf(rx_data_subpacket + strlen(rx_data_subpacket) + 1,
-@@ -342,7 +343,7 @@
+@@ -243,6 +244,7 @@
+ 		fstat(fileno(fp),&s);
+ 
+ 		fclose(fp);
++		fp = NULL;
+ 	}
+ 	else {
+ 		exists = FALSE;
+@@ -342,7 +344,7 @@
  	 */
  
  	if (opt_v) {
@@ -35,7 +43,7 @@
  	}
  }
  
-@@ -386,8 +387,6 @@
+@@ -386,8 +388,6 @@
  	printf("	-q          quiet\n");
  	printf("	(only one of -n -c or -p may be specified)\n");
  



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304220728.r3M7SCnf044645>