You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
I found some Memory not freed in time when debug_print is set to verbose
in function restrict_indexes()
when debug_level > 0 , buf malloc 1024 bytes
if (debug_level > 0)
initStringInfo(&buf);
at the end of restrict_indexes() , buf.data is freed only if debug_level = 1.
I think buf.data is not freed in time when debug_level is 2 or 3.
[ps. After my check, is does not cause memleak]
if (debug_level == 1)
{
initStringInfo(&rel_buf);
...
pfree(buf.data);
pfree(rel_buf.data);
}
I think a new if branch can be create to free buf.data, like the following;
if (debug_level == 1)
{
initStringInfo(&rel_buf);
...
pfree(rel_buf.data);
}
if (debug_level > 0)
pfree(buf.data);
The text was updated successfully, but these errors were encountered:
It is already fixed at master. but don't be so nervous about that:p The memory will be freed up at the end of query. In some sense the pfree is not required at all.
That being said it is not neat that the code behaves differently for subtle conditions.
I committed that change in the PG13 branch in the repo.
Hi
I found some Memory not freed in time when debug_print is set to verbose
in function
restrict_indexes()
when debug_level > 0 , buf malloc 1024 bytes
at the end of
restrict_indexes()
, buf.data is freed only if debug_level = 1.I think buf.data is not freed in time when debug_level is 2 or 3.
[ps. After my check, is does not cause memleak]
I think a new if branch can be create to free buf.data, like the following;
The text was updated successfully, but these errors were encountered: