diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-10-17 14:01:15 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:43:12 +0100 |
commit | 190039a378ee208a026f868d083d7c00918d1b5f (patch) | |
tree | cc71f39fee470b80133c708ed8936fba2cb641b1 | |
parent | 066f56bfeffcbd4808606d4a81c0f0cefa92e07e (diff) | |
download | samba-190039a378ee208a026f868d083d7c00918d1b5f.tar.gz samba-190039a378ee208a026f868d083d7c00918d1b5f.tar.bz2 samba-190039a378ee208a026f868d083d7c00918d1b5f.zip |
r25682: r16320: Ensure variable is not null before calling fclose. Klocwork #412. Jeremy.
(cherry picked from commit 33ee0cfb190a883229d0824d7194898fd8966ceb)
(This used to be commit 3910d069413834744b17175bb29775a69002712e)
-rw-r--r-- | source4/lib/replace/getpass.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/replace/getpass.c b/source4/lib/replace/getpass.c index c67ff2bda7..dace5fbb8a 100644 --- a/source4/lib/replace/getpass.c +++ b/source4/lib/replace/getpass.c @@ -218,7 +218,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 */ |