diff options
| author | Tom Lane | 2001-02-07 23:42:27 +0000 |
|---|---|---|
| committer | Tom Lane | 2001-02-07 23:42:27 +0000 |
| commit | 474d0cf72552284c519e799d8613b3169e49222a (patch) | |
| tree | e3383ffa7a216810fde6455cee25bd714ce4e62d | |
| parent | e049acd7cace34d67d4303cf8698a5206acfb72c (diff) | |
Back-patch password leak fix for Vaschenko.REL7_0_PATCHES
| -rw-r--r-- | src/backend/libpq/crypt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/backend/libpq/crypt.c b/src/backend/libpq/crypt.c index c52f2608ac..4b33fcef2d 100644 --- a/src/backend/libpq/crypt.c +++ b/src/backend/libpq/crypt.c @@ -59,6 +59,7 @@ crypt_getpwdreloadfilename() bufsize = strlen(pwdfilename) + strlen(CRYPT_PWD_RELOAD_SUFX) + 1; rpfnam = (char *) palloc(bufsize); snprintf(rpfnam, bufsize, "%s%s", pwdfilename, CRYPT_PWD_RELOAD_SUFX); + pfree(pwdfilename); return rpfnam; } @@ -79,6 +80,8 @@ crypt_openpwdfile() pwdfile = AllocateFile(filename, "rb"); #endif + pfree(filename); + return pwdfile; } @@ -131,6 +134,7 @@ crypt_loadpwdfile() filename = crypt_getpwdreloadfilename(); result = unlink(filename); + pfree(filename); /* * We want to delete the flag file before reading the contents of the |
