• Bruce Momjian's avatar
    Currently, contrib/oid2name doesn't bother to free() the memory that it · 66cd6a0f
    Bruce Momjian authored
    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
    66cd6a0f
oid2name.c 10.1 KB