mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-07 19:47:50 +08:00
Fix minor memory leak in PLy_typeinfo_dealloc().
We forgot to free the per-attribute array element descriptors. Jan Urbański
This commit is contained in:
parent
ed75380bda
commit
a14fa84693
@ -74,8 +74,20 @@ PLy_typeinfo_dealloc(PLyTypeInfo *arg)
|
||||
{
|
||||
if (arg->is_rowtype == 1)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < arg->in.r.natts; i++)
|
||||
{
|
||||
if (arg->in.r.atts[i].elm != NULL)
|
||||
PLy_free(arg->in.r.atts[i].elm);
|
||||
}
|
||||
if (arg->in.r.atts)
|
||||
PLy_free(arg->in.r.atts);
|
||||
for (i = 0; i < arg->out.r.natts; i++)
|
||||
{
|
||||
if (arg->out.r.atts[i].elm != NULL)
|
||||
PLy_free(arg->out.r.atts[i].elm);
|
||||
}
|
||||
if (arg->out.r.atts)
|
||||
PLy_free(arg->out.r.atts);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user