| From: | momjian(at)postgresql(dot)org (Bruce Momjian - CVS) |
|---|---|
| To: | pgsql-committers(at)postgresql(dot)org |
| Subject: | pgsql/contrib/oid2name oid2name.c |
| Date: | 2002-03-05 05:54:08 |
| Message-ID: | 20020305055408.DE5974764D4@postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
CVSROOT: /cvsroot
Module name: pgsql
Changes by: momjian(at)postgresql(dot)org 02/03/05 00:54:07
Modified files:
contrib/oid2name: oid2name.c
Log message:
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.
Neil Conway
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian - CVS | 2002-03-05 06:07:28 | pgsql/src/interfaces/libpq fe-exec.c fe-misc.c ... |
| Previous Message | Bruce Momjian - CVS | 2002-03-05 05:52:51 | pgsql/ /configure /configure.in oc/README.mb.j ... |