diff options
author | Volker Lendecke <vl@samba.org> | 2008-03-15 22:27:05 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-03-18 16:40:46 +0100 |
commit | 6f6d38d24a69aec614e443c6a5cd0d6ed6b1b70e (patch) | |
tree | 61eba5814ca4514f37faa4e9f8c08fcc75786c0d /source4/lib | |
parent | 7fb3963032ce8f6b7f5c652dd69d3315cae897ea (diff) | |
download | samba-6f6d38d24a69aec614e443c6a5cd0d6ed6b1b70e.tar.gz samba-6f6d38d24a69aec614e443c6a5cd0d6ed6b1b70e.tar.bz2 samba-6f6d38d24a69aec614e443c6a5cd0d6ed6b1b70e.zip |
Fix Coverity ID 554
(cherry picked from commit 471b1b0c58bc2def5d2fe9d98401def34724d447)
(This used to be commit effda48a2670325fed56e158539417c6f95381b8)
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/replace/getpass.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/lib/replace/getpass.c b/source4/lib/replace/getpass.c index 57e28eb981..73333b9021 100644 --- a/source4/lib/replace/getpass.c +++ b/source4/lib/replace/getpass.c @@ -187,6 +187,9 @@ char *rep_getpass(const char *prompt) in_fd = fileno(in); if (fgets(buf, bufsize, in) == NULL) { buf[0] = 0; + if (in && in != stdin) { + fclose(in); + } return buf; } } |