]> git.vpit.fr Git - perl/modules/Variable-Magic.git/commitdiff
SvREFCNT_dec already checks if the SV is non null
authorVincent Pit <vince@profvince.com>
Thu, 19 Aug 2010 10:47:16 +0000 (12:47 +0200)
committerVincent Pit <vince@profvince.com>
Thu, 19 Aug 2010 10:47:16 +0000 (12:47 +0200)
Magic.xs

index 0d6359e83d5529815bd7b136205acede6f29c9bd..0e9ff74ef9f3aac4a394392d0a54cd8497cc2330 100644 (file)
--- a/Magic.xs
+++ b/Magic.xs
@@ -447,26 +447,26 @@ STATIC void vmg_mgwiz_free(pTHX_ MGWIZ *w) {
  if (!w)
   return;
 
if (w->cb_data)   SvREFCNT_dec(w->cb_data);
if (w->cb_get)    SvREFCNT_dec(w->cb_get);
if (w->cb_set)    SvREFCNT_dec(w->cb_set);
if (w->cb_len)    SvREFCNT_dec(w->cb_len);
if (w->cb_clear)  SvREFCNT_dec(w->cb_clear);
if (w->cb_free)   SvREFCNT_dec(w->cb_free);
+ SvREFCNT_dec(w->cb_data);
+ SvREFCNT_dec(w->cb_get);
+ SvREFCNT_dec(w->cb_set);
+ SvREFCNT_dec(w->cb_len);
+ SvREFCNT_dec(w->cb_clear);
+ SvREFCNT_dec(w->cb_free);
 #if MGf_COPY
if (w->cb_copy)   SvREFCNT_dec(w->cb_copy);
+ SvREFCNT_dec(w->cb_copy);
 #endif /* MGf_COPY */
 #if 0 /* MGf_DUP */
if (w->cb_dup)    SvREFCNT_dec(w->cb_dup);
+ SvREFCNT_dec(w->cb_dup);
 #endif /* MGf_DUP */
 #if MGf_LOCAL
if (w->cb_local)  SvREFCNT_dec(w->cb_local);
+ SvREFCNT_dec(w->cb_local);
 #endif /* MGf_LOCAL */
 #if VMG_UVAR
if (w->cb_fetch)  SvREFCNT_dec(w->cb_fetch);
if (w->cb_store)  SvREFCNT_dec(w->cb_store);
if (w->cb_exists) SvREFCNT_dec(w->cb_exists);
if (w->cb_delete) SvREFCNT_dec(w->cb_delete);
+ SvREFCNT_dec(w->cb_fetch);
+ SvREFCNT_dec(w->cb_store);
+ SvREFCNT_dec(w->cb_exists);
+ SvREFCNT_dec(w->cb_delete);
 #endif /* VMG_UVAR */
 
  Safefree(w->vtbl);