diff options
author | Volker Lendecke <vl@samba.org> | 2008-03-15 22:27:05 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-03-15 22:30:25 +0100 |
commit | 2157f67e3809a594d7c8f84c077311f9e6995e37 (patch) | |
tree | 352f0ac112be3a40367b88621e517332e878c83d /source3/lib | |
parent | e2ab1a0f98e04e8d5b81ef485f3fd6986cec206f (diff) | |
download | samba-2157f67e3809a594d7c8f84c077311f9e6995e37.tar.gz samba-2157f67e3809a594d7c8f84c077311f9e6995e37.tar.bz2 samba-2157f67e3809a594d7c8f84c077311f9e6995e37.zip |
Fix Coverity ID 554
(This used to be commit 471b1b0c58bc2def5d2fe9d98401def34724d447)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/replace/getpass.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/lib/replace/getpass.c b/source3/lib/replace/getpass.c index 57e28eb981..73333b9021 100644 --- a/source3/lib/replace/getpass.c +++ b/source3/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; } } |