]> git.vpit.fr Git - perl/modules/Scope-Upper.git/commitdiff
Fix a memory leak with the uid() feature
authorVincent Pit <vince@profvince.com>
Thu, 19 Mar 2015 13:52:58 +0000 (10:52 -0300)
committerVincent Pit <vince@profvince.com>
Thu, 19 Mar 2015 13:52:58 +0000 (10:52 -0300)
The user data token was never freed.

Upper.xs

index 27397091936b248267348e9bbe075f900311671f..91c487b1f8c2540d1174c1772adff260a6191bb1 100644 (file)
--- a/Upper.xs
+++ b/Upper.xs
@@ -1955,6 +1955,8 @@ STATIC void su_uid_bump(pTHX_ void *ud_) {
  su_ud_reap *ud  = ud_;
 
  SAVEDESTRUCTOR_X(su_uid_drop, ud->cb);
+
+ SU_UD_FREE(ud);
 }
 
 STATIC SV *su_uid_get(pTHX_ I32 cxix) {