diff options
author | Jeremy Allison <jra@samba.org> | 2006-06-16 23:07:42 +0000 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-10-15 13:20:41 +0200 |
commit | a09bc48a1db9dcf4cb844dc8e2075035031773e1 (patch) | |
tree | 06df598b35afc4d91d7200c0becfd0d9a7a511e8 /source3 | |
parent | 335c35318a698631bf1db068e110d66b14f0b2d6 (diff) | |
download | samba-a09bc48a1db9dcf4cb844dc8e2075035031773e1.tar.gz samba-a09bc48a1db9dcf4cb844dc8e2075035031773e1.tar.bz2 samba-a09bc48a1db9dcf4cb844dc8e2075035031773e1.zip |
r16320: Ensure variable is not null before calling fclose. Klocwork #412. Jeremy.
(This used to be commit 33ee0cfb190a883229d0824d7194898fd8966ceb)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/replace/getpass.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/replace/getpass.c b/source3/lib/replace/getpass.c index c67ff2bda7..dace5fbb8a 100644 --- a/source3/lib/replace/getpass.c +++ b/source3/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 */ |