Re: BUG #1258: backend memory leak after massive 'CREATE/DROP USER'
От | Tom Lane |
---|---|
Тема | Re: BUG #1258: backend memory leak after massive 'CREATE/DROP USER' |
Дата | |
Msg-id | 27731.1095470693@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | BUG #1258: backend memory leak after massive 'CREATE/DROP USER' ("PostgreSQL Bugs List" <pgsql-bugs@postgresql.org>) |
Список | pgsql-bugs |
"PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes: > Description: backend memory leak after massive 'CREATE/DROP USER' Actually postmaster memory leak, but good catch anyway --- thanks! The patch against 7.4 is Index: hba.c =================================================================== RCS file: /cvsroot/pgsql-server/src/backend/libpq/hba.c,v retrieving revision 1.116.2.2 diff -c -r1.116.2.2 hba.c *** hba.c 25 May 2004 19:11:26 -0000 1.116.2.2 --- hba.c 18 Sep 2004 01:16:18 -0000 *************** *** 168,173 **** --- 168,176 ---- * Tokenize file and handle file inclusion and comma lists. We have * to break apart the commas to expand any file names then * reconstruct with commas. + * + * The result is always a palloc'd string. If it's zero-length then + * we have reached EOL. */ static char * next_token_expand(FILE *file) *************** *** 333,338 **** --- 336,343 ---- { /* we are at real or logical EOL, so force a new line List */ next_line = NIL; + /* Don't forget to pfree the next_token_expand result */ + pfree(buf); } /* Advance line number whenever we reach EOL */ regards, tom lane
В списке pgsql-bugs по дате отправления: