diff options
author | 2006-04-11 07:52:34 +0000 | |
---|---|---|
committer | 2006-04-11 07:52:34 +0000 | |
commit | b8171fd550ca0060f7efa1e80634e7bb11c4d30a (patch) | |
tree | 99037fc87a607005b90d4d1d855f4d78034ff092 | |
parent | duplicate in the safe list (diff) | |
download | wireguard-openbsd-b8171fd550ca0060f7efa1e80634e7bb11c4d30a.tar.xz wireguard-openbsd-b8171fd550ca0060f7efa1e80634e7bb11c4d30a.zip |
Don't close() before fatal().
OK joris@, niallo@, and xsa@.
-rw-r--r-- | usr.bin/cvs/proto.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.bin/cvs/proto.c b/usr.bin/cvs/proto.c index 885c7afbb2c..aeb30a6450c 100644 --- a/usr.bin/cvs/proto.c +++ b/usr.bin/cvs/proto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proto.c,v 1.94 2006/04/05 01:38:55 ray Exp $ */ +/* $OpenBSD: proto.c,v 1.95 2006/04/11 07:52:34 ray Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -520,10 +520,8 @@ cvs_sendfile(struct cvsroot *root, const char *path) cvs_sendln(root, buf); while ((ret = read(fd, buf, sizeof(buf))) != 0) { - if (ret == -1) { - (void)close(fd); + if (ret == -1) fatal("cvs_sendfile: read error on '%s'", path); - } cvs_sendraw(root, buf, (size_t)ret); } |