Permalink
Browse files

fixed newly introduced memleak (was calling extra SvREFCNT_inc when S…

…V* isnt made mortal twice)
  • Loading branch information...
1 parent 9709efb commit a6cddb9f35dfac861b061a633c8302f2af876695 @FROGGS FROGGS committed Oct 16, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/SDLx/Validate.h
View
@@ -47,7 +47,8 @@ SV *create_mortal_rect( SV *rect, int* new_rect_made)
/* we already had a good mortal rect . Just pass it along */
(*new_rect_made) = 0;
retval = rect;
- SvREFCNT_inc(rect);
+ // no need to inc REFCNT since we dont make the SV mortal twice
+ //SvREFCNT_inc(rect);
}
else
croak("Rect must be number or arrayref or SDL::Rect or undef");

0 comments on commit a6cddb9

Please sign in to comment.