This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove a redundant test on mg->mg_ptr. (It had to be non-NULL to get
authorNicholas Clark <nick@ccl4.org>
Sun, 19 Mar 2006 19:26:05 +0000 (19:26 +0000)
committerNicholas Clark <nick@ccl4.org>
Sun, 19 Mar 2006 19:26:05 +0000 (19:26 +0000)
into this block).

p4raw-id: //depot/perl@27543

sv.c

diff --git a/sv.c b/sv.c
index 78e0d24..6eaaae8 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -4576,7 +4576,7 @@ Perl_sv_unmagic(pTHX_ SV *sv, int type)
                    Safefree(mg->mg_ptr);
                else if (mg->mg_len == HEf_SVKEY)
                    SvREFCNT_dec((SV*)mg->mg_ptr);
-               else if (mg->mg_type == PERL_MAGIC_utf8 && mg->mg_ptr)
+               else if (mg->mg_type == PERL_MAGIC_utf8)
                    Safefree(mg->mg_ptr);
             }
            if (mg->mg_flags & MGf_REFCOUNTED)