git.samba.org
/
kai
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
44122f0
)
Fix Coverity ID 554
author
Volker Lendecke
<vl@samba.org>
Sat, 15 Mar 2008 21:27:05 +0000
(22:27 +0100)
committer
Volker Lendecke
<vl@samba.org>
Sat, 15 Mar 2008 21:30:25 +0000
(22:30 +0100)
source/lib/replace/getpass.c
patch
|
blob
|
history
diff --git
a/source/lib/replace/getpass.c
b/source/lib/replace/getpass.c
index 57e28eb981577594c2d8b6a0511fe2a21157f9ec..73333b902199b92d6627f2c1794124ebf7922ce8 100644
(file)
--- a/
source/lib/replace/getpass.c
+++ b/
source/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;
}
}