summaryrefslogtreecommitdiff
path: root/usr.bin/rsync/main.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2019-05-28 18:20:31 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2019-05-28 18:20:31 +0000
commitc6b4d79dd2bc5acb85e9b1f5073f0b57c0d18ae6 (patch)
treee14815f53d9f10a61eb123511c46165be2ae6e9a /usr.bin/rsync/main.c
parent564539e45e386971f73d05d5a3d9f457ded5535b (diff)
unintialized fd passed to close(), found by hiltjo posthuma
Diffstat (limited to 'usr.bin/rsync/main.c')
-rw-r--r--usr.bin/rsync/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/rsync/main.c b/usr.bin/rsync/main.c
index 967e6528bc2..4f6137420b4 100644
--- a/usr.bin/rsync/main.c
+++ b/usr.bin/rsync/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.45 2019/05/08 20:00:25 benno Exp $ */
+/* $Id: main.c,v 1.46 2019/05/28 18:20:30 deraadt Exp $ */
/*
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -271,7 +271,7 @@ main(int argc, char *argv[])
{
struct opts opts;
pid_t child;
- int fds[2], sd, rc, c, st, i;
+ int fds[2], sd = -1, rc, c, st, i;
struct sess sess;
struct fargs *fargs;
char **args;