summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Straz <nstraz@redhat.com>2013-09-19 14:44:19 -0400
committerNathan Straz <nstraz@redhat.com>2013-09-19 14:44:19 -0400
commit471105fc6138af9dcd6c0a409c0b4937ea6cac6d (patch)
treea427d98db209fba72e89cd1e18f27e8bf168384c
parent8bc29add2abf434390b3e6696ff7b364d658f028 (diff)
downloadqarsh-471105fc6138af9dcd6c0a409c0b4937ea6cac6d.tar.gz
qarsh-471105fc6138af9dcd6c0a409c0b4937ea6cac6d.tar.xz
qarsh-471105fc6138af9dcd6c0a409c0b4937ea6cac6d.zip
Close qacp_fd in the function that openned it.
We are already closing it in recvfiles because we could create multiple connections. This caused us to close the fd twice.
-rw-r--r--qacp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/qacp.c b/qacp.c
index 4e9c95d..3afc35e 100644
--- a/qacp.c
+++ b/qacp.c
@@ -598,6 +598,7 @@ sendfiles(char **argv, int argc, int fileidx, short recursive)
free_rstat(rstatp);
}
+ close(qacp_fd);
return 0;
}
@@ -644,8 +645,6 @@ main(int argc, char *argv[])
}
}
- close(qacp_fd);
-
if (eflag) {
exit(1);
}