summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-06-16 23:07:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:17:33 -0500
commit61c96308fb03cbb1308d109f047647fa095d1b06 (patch)
treec89e764cc8a121d250a2cb5bbd01aa36fcf742df
parent52d6b8339a76c78176aaadf8dc7ba12a8bfd9c38 (diff)
downloadsamba-61c96308fb03cbb1308d109f047647fa095d1b06.tar.gz
samba-61c96308fb03cbb1308d109f047647fa095d1b06.tar.bz2
samba-61c96308fb03cbb1308d109f047647fa095d1b06.zip
r16320: Ensure variable is not null before calling fclose.
Klocwork #412. Jeremy. (This used to be commit fed55d653a73d09550a90a4904023580dd46ae76)
-rw-r--r--source3/lib/getsmbpass.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/getsmbpass.c b/source3/lib/getsmbpass.c
index a7780f7c12..bebddc69eb 100644
--- a/source3/lib/getsmbpass.c
+++ b/source3/lib/getsmbpass.c
@@ -163,7 +163,7 @@ char *getsmbpass(const char *prompt)
fprintf(out, "\n");
fflush(out);
- if (in != stdin) /* We opened the terminal; now close it. */
+ if (in && in != stdin) /* We opened the terminal; now close it. */
fclose(in);
/* Catch problematic signals */