Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/dist/ssh Don't attempt to close a random file descrip...



details:   https://anonhg.NetBSD.org/src/rev/5b4bd28e1aa5
branches:  trunk
changeset: 581494:5b4bd28e1aa5
user:      lukem <lukem%NetBSD.org@localhost>
date:      Thu Jun 02 04:57:33 2005 +0000

description:
Don't attempt to close a random file descriptor upon error.
Detected with gcc -Wuninitialized.

diffstat:

 crypto/dist/ssh/scp.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 9e27fcb76039 -r 5b4bd28e1aa5 crypto/dist/ssh/scp.c
--- a/crypto/dist/ssh/scp.c     Thu Jun 02 04:56:14 2005 +0000
+++ b/crypto/dist/ssh/scp.c     Thu Jun 02 04:57:33 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scp.c,v 1.26 2005/04/23 16:53:28 christos Exp $        */
+/*     $NetBSD: scp.c,v 1.27 2005/06/02 04:57:33 lukem Exp $   */
 /*
  * scp - secure remote copy.  This is basically patched BSD rcp which
  * uses ssh to do the data transfer (instead of using rcmd).
@@ -73,7 +73,7 @@
 
 #include "includes.h"
 RCSID("$OpenBSD: scp.c,v 1.119 2005/01/24 10:22:06 dtucker Exp $");
-__RCSID("$NetBSD: scp.c,v 1.26 2005/04/23 16:53:28 christos Exp $");
+__RCSID("$NetBSD: scp.c,v 1.27 2005/06/02 04:57:33 lukem Exp $");
 
 #include "xmalloc.h"
 #include "atomicio.h"
@@ -505,6 +505,7 @@
        int len;
 
        for (indx = 0; indx < argc; ++indx) {
+               fd = -1;
                name = argv[indx];
                statbytes = 0;
                len = strlen(name);



Home | Main Index | Thread Index | Old Index