Re: [PATCHES] [HACKERS] Patch for psql.c
| От | Tymm Twillman |
|---|---|
| Тема | Re: [PATCHES] [HACKERS] Patch for psql.c |
| Дата | |
| Msg-id | 69c7bb8585d652358105bdf8179b904f обсуждение исходный текст |
| Список | pgsql-hackers |
On Mon, 2 Jun 1997, Igor wrote: > Well...I put these PQclear's in because there were memory leaks in that > area. If you put it outside, of the case statement, you start clearing > already freed tuples causing a mess (Marc.. that was the reason why > regression screwed up on boolean). Now, there are a few more memory leaks > (particularly with PGsettings *settings variable) but it doesn't leak much > and will be left alone until 6.2 probably. > I guess if you do if(results) PQclear (results)...oh well...There are no > memory leaks from PQexec anymore so might just as well leave it alone for > now. Sorry, I should have said outside of the switch statement. With the current code, if the result of the exec is an error, the returned value (results) from PQexec is not freed. It's a very small leak, but Purify was kicking it out. I removed all of the PQclears from the individual statements and moved them to the bottom of the switch. (I'm sorry if I'm just misunderstanding what you are saying...) BTW, I'd also like to apologize for the tone of my messages earlier (and the poorly constructed patches); it is a mixture of being new to the postgresql project and a major lack of sleep. - -Tymm ------------------------------
В списке pgsql-hackers по дате отправления: