Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 080297a1c054c421f95cf78ca4f58a960f1d124f
      
https://github.com/Perl/perl5/commit/080297a1c054c421f95cf78ca4f58a960f1d124f
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-15 (Fri, 15 Sep 2023)

  Changed paths:
    M class.c

  Log Message:
  -----------
  class: don't leak the default initialiser ops if they're forbidden

Previously if forbid_outofblock_ops() here threw an error the ops
from defop would leak, including leaking the slab(s) containing
those ops.

To prevent that, populate the defop for the field with the supplied ops
before calling forbid_outofblock_ops(), then as the save stack rewinds
class_seal_stash() will check the error count and free the ops.

Fixes #20812


Reply via email to