Add missing pfree during acl propagation

When assigning acl from datum, it's possible that we have a detoasted copy.
In such situation, we ought to pfree() it, here during TABLE GRANTS
propagation.

It's not directly related with the PR, but a discovery while being here.
pull/7918/head
Cédric Villemain 2025-03-26 09:25:21 +01:00
parent cffa4f399f
commit f26d153612
1 changed files with 4 additions and 0 deletions

View File

@ -1230,6 +1230,10 @@ pg_get_table_grants(Oid relationId)
resetStringInfo(&buffer);
}
}
/* if we have a detoasted copy, free it */
if ((Pointer) acl != DatumGetPointer(aclDatum))
pfree(acl);
}
resetStringInfo(&buffer);