From: | Neil Conway <nconway(at)klamath(dot)dyndns(dot)org> |
---|---|
To: | pgsql-patches(at)postgresql(dot)org |
Subject: | oid2name cleanup |
Date: | 2002-02-24 21:22:58 |
Message-ID: | 1014585778.7686.83.camel@jiro |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
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 | Content-Type | Size |
---|---|---|
oid2name_cleanup.patch | text/x-patch | 5.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-02-24 21:35:49 | Re: ALTER TABLE OWNER: change indexes |
Previous Message | Neil Conway | 2002-02-24 21:13:30 | ALTER TABLE OWNER: change indexes |