Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 47f944c

Browse files
Bug 1855952 - nss_secutil.c: Resource leak: input r=andi
Differential Revision: https://phabricator.services.mozilla.com/D190110
1 parent 78f7639 commit 47f944c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/libmar/sign/nss_secutil.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ char* GetPasswordString(void* arg, char* prompt) {
7676

7777
if (!QUIET_FGETS(phrase, sizeof(phrase), input)) {
7878
fprintf(stderr, "QUIET_FGETS failed\n");
79+
#ifndef _WINDOWS
80+
if (isInputTerminal) {
81+
fclose(input);
82+
}
83+
#endif
7984
return NULL;
8085
}
8186

0 commit comments

Comments
 (0)