8000 Back-patch password leak fix for Vaschenko. · sangli00/postgres@1a604c3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1a604c3

Browse files
committed
Back-patch password leak fix for Vaschenko.
1 parent 7bfec16 commit 1a604c3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/backend/libpq/crypt.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Dec 17, 1997 - Todd A. Brandys
1010
* Orignal Version Completed.
1111
*
12-
* $Id: crypt.c,v 1.23 1999/07/17 20:17:01 momjian Exp $
12+
* $Id: crypt.c,v 1.23.2.1 2001/02/07 23:42:27 tgl Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -59,6 +59,7 @@ crypt_getpwdreloadfilename()
5959
bufsize = strlen(pwdfilename) + strlen(CRYPT_PWD_RELOAD_SUFX) + 1;
6060
rpfnam = (char *) palloc(bufsize);
6161
snprintf(rpfnam, bufsize, "%s%s", pwdfilename, CRYPT_PWD_RELOAD_SUFX);
62+
pfree(pwdfilename);
6263

6364
return rpfnam;
6465
}
@@ -79,6 +80,8 @@ crypt_openpwdfile()
7980
pwdfile = AllocateFile(filename, "rb");
8081
#endif
8182

83+
pfree(filename);
84+
8285
return pwdfile;
8386
}
8487

@@ -131,6 +134,7 @@ crypt_loadpwdfile()
131134

132135
filename = crypt_getpwdreloadfilename();
133136
result = unlink(filename);
137+
pfree(filename);
134138

135139
/*
136140
* We want to delete the flag file before reading the contents of the

0 commit comments

Comments
 (0)
0