Hi all, attached patch fixes a memory leak when a user-defined function returns a polymorphic type/class. The issue was, that the polymorphic type was not detected correctly and therefore the len-field was not transferred correctly. Regtests ok x86_64-linux/Fedora 39. Ok for master? Regards, Andre -- Andre Vehreschild * Email: vehre ad gmx dot de