aboutsummaryrefslogtreecommitdiffstats
path: root/comms
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2013-04-22 15:28:11 +0800
committerdanfe <danfe@FreeBSD.org>2013-04-22 15:28:11 +0800
commit96929ef9fe9cc4c8f64e688841827a454f34ee69 (patch)
treed82c998cc86d5e305521a64f4f7bb7080bf1148e /comms
parentd5ce17d854dff22ee666998c703acd3c0f603965 (diff)
downloadfreebsd-ports-gnome-96929ef9fe9cc4c8f64e688841827a454f34ee69.tar.gz
freebsd-ports-gnome-96929ef9fe9cc4c8f64e688841827a454f34ee69.tar.zst
freebsd-ports-gnome-96929ef9fe9cc4c8f64e688841827a454f34ee69.zip
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
Diffstat (limited to 'comms')
-rw-r--r--comms/zmtx-zmrx/files/patch-zmrx.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/comms/zmtx-zmrx/files/patch-zmrx.c b/comms/zmtx-zmrx/files/patch-zmrx.c
index 68f2df57ab08..5933b05db770 100644
--- a/comms/zmtx-zmrx/files/patch-zmrx.c
+++ b/comms/zmtx-zmrx/files/patch-zmrx.c
@@ -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");