Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita14fa84

Browse files
committed
Fix minor memory leak in PLy_typeinfo_dealloc().
We forgot to free the per-attribute array element descriptors.Jan Urbański
1 parented75380 commita14fa84

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

‎src/pl/plpython/plpy_typeio.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,20 @@ PLy_typeinfo_dealloc(PLyTypeInfo *arg)
7474
{
7575
if (arg->is_rowtype==1)
7676
{
77+
inti;
78+
79+
for (i=0;i<arg->in.r.natts;i++)
80+
{
81+
if (arg->in.r.atts[i].elm!=NULL)
82+
PLy_free(arg->in.r.atts[i].elm);
83+
}
7784
if (arg->in.r.atts)
7885
PLy_free(arg->in.r.atts);
86+
for (i=0;i<arg->out.r.natts;i++)
87+
{
88+
if (arg->out.r.atts[i].elm!=NULL)
89+
PLy_free(arg->out.r.atts[i].elm);
90+
}
7991
if (arg->out.r.atts)
8092
PLy_free(arg->out.r.atts);
8193
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp