mirror of
https://github.com/postgres/postgres.git
synced 2025-06-01 00:01:20 -04: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)
|
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)
|
if (arg->in.r.atts)
|
||||||
PLy_free(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)
|
if (arg->out.r.atts)
|
||||||
PLy_free(arg->out.r.atts);
|
PLy_free(arg->out.r.atts);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user