PostgreSQL 7.0.3: Memory leak in ESQL library

Started by Thorsten Knabeover 25 years ago2 messagesbugs
Jump to latest
#1Thorsten Knabe
tek@thorsten-knabe.de

Hello,

I've found a memory leak in libecpg of PostgreSQL 7.0.3.
The leak is caused by the memory allocation in
src/interfaces/ecpg/lib/execute.c in line 669 which is never freed.
Adding a "free(array_query);" after PQexec in line 671 seems to fix the
leak.

Regards
Thorsten

--
E-Mail: tek@thorsten-knabe.de
___ WWW: http://tek.thorsten-knabe.de
| | / ICQ: 5472045
|horsten |/\nabe Linux AD1816 sound driver developer

#2Bruce Momjian
bruce@momjian.us
In reply to: Thorsten Knabe (#1)
Re: PostgreSQL 7.0.3: Memory leak in ESQL library

Yes, I see the problem you reported. Here is the patch I have applied.
Thanks.

Hello,

I've found a memory leak in libecpg of PostgreSQL 7.0.3.
The leak is caused by the memory allocation in
src/interfaces/ecpg/lib/execute.c in line 669 which is never freed.
Adding a "free(array_query);" after PQexec in line 671 seems to fix the
leak.

Regards
Thorsten

--
E-Mail: tek@thorsten-knabe.de
___ WWW: http://tek.thorsten-knabe.de
| | / ICQ: 5472045
|horsten |/\nabe Linux AD1816 sound driver developer

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Attachments:

/bjm/difftext/plainDownload+1-0