Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 5d273abb14ecf2af8a75115442c938b8a5979ebe
      
https://github.com/Perl/perl5/commit/5d273abb14ecf2af8a75115442c938b8a5979ebe
  Author: David Mitchell <da...@iabyn.com>
  Date:   2021-02-22 (Mon, 22 Feb 2021)

  Changed paths:
    M mg.c

  Log Message:
  -----------
  fixup Perl_magic_freemglob()

In v5.33.3-24-g02a48966c3 I added the Perl_magic_freemglob() function,
which allowed special-case handling of the pos() magic type to be
removed from S_mg_free_struct().

However, I got it wrong, by more or less copying the same code from
another such function I had just created. So I made
Perl_magic_freemglob() free mg_ptr(), but in the case of pos magic, this
doesn't point to a buffer which needs freeing. In fact its currently
always NULL so attempting to free it is harmless - but this commit
removes the free() for logical soundness and future robustness.


Reply via email to