| From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
|---|---|
| To: | Neil Conway <nconway(at)klamath(dot)dyndns(dot)org> |
| Cc: | pgsql-patches(at)postgresql(dot)org |
| Subject: | Re: oid2name cleanup |
| Date: | 2002-03-05 05:54:13 |
| Message-ID: | 200203050554.g255sDG18581@candle.pha.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-patches |
Patch applied. Thanks.
---------------------------------------------------------------------------
Neil Conway wrote:
> Currently, contrib/oid2name doesn't bother to free() the memory that it
> malloc()'s. This isn't too serious (because oid2name is a short-lived
> utility, so the memory will soon be returned to the OS on process
> termination), but I still think it's poor style.
>
> This patch changes oid2name so that it allocates memory on the stack
> where possible and free()s the remaining heap-allocated memory. The
> patch also fixes a typo a comment and adds 'const' qualifiers to a few
> 'char *' function parameters.
>
> Cheers,
>
> Neil
>
> --
> Neil Conway <neilconway(at)rogers(dot)com>
> PGP Key ID: DB3C29FC
[ Attachment, skipping... ]
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2002-03-05 06:07:37 | Re: Fix for non-blocking connections in libpq |
| Previous Message | Bruce Momjian | 2002-03-05 05:52:31 | Re: Added Encoding |