Fix uninitialized file descriptor
authorJoseph C. Lehner <joseph.c.lehner@gmail.com>
Mon, 21 Nov 2016 20:24:53 +0000 (21:24 +0100)
committerJoseph C. Lehner <joseph.c.lehner@gmail.com>
Mon, 21 Nov 2016 20:24:53 +0000 (21:24 +0100)
tftp.c

diff --git a/tftp.c b/tftp.c
index a291ac0ac0c521e5c1994958d57e4228c7026d8e..0b25a9e32db6e1f4c68ab1f983407a47536bfccc 100644 (file)
--- a/tftp.c
+++ b/tftp.c
@@ -238,6 +238,7 @@ int tftp_put(struct nmrpd_args *args)
 
        sock = -1;
        ret = -1;
+       fd = -1;
 
        if (g_interrupted) {
                goto cleanup;