memory leak fix in serializer (#1988)

1 file changed