Re: Small patch for memory leak in src/backend/catalog/pg_proc.c

From: Denis Perchine <dyp(at)perchine(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Small patch for memory leak in src/backend/catalog/pg_proc.c
Date: 2000-06-13 15:19:17
Message-ID: 00061322234001.00485@dyp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

> heap_close(rel, RowExclusiveLock);
> + heap_freetuple(tup);
> return tup->t_data->t_oid;
> }
>
> Uh, you didn't notice that the tuple you just freed is still in use
> on the next line?

That's right :-((( Will try to be a little bit more accurate.

> Memory leaks like this are not worth worrying about because the memory
> will be reclaimed at end of transaction --- maybe even sooner after
> I improve the memory-context handling.

But anyway it is better to free memory, because transaction can be quite large.
New patch attached.

BTW, could you please say what memory leaks can be safely ignored.

--
Sincerely Yours,
Denis Perchine

----------------------------------
E-Mail: dyp(at)perchine(dot)com
HomePage: http://www.perchine.com/dyp/
FidoNet: 2:5000/120.5
----------------------------------

Attachment Content-Type Size
pg_proc.c.patch text/x-c 814 bytes

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Denis Perchine 2000-06-13 15:34:57 Re: Small patch for memory leak in src/backend/catalog/pg_proc.c
Previous Message Tom Lane 2000-06-13 15:16:57 Re: Big 7.1 open items