diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-12-09 15:55:29 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-12-09 15:55:29 +0000 |
commit | a056e218cd7d87e10e8f546fe20d02e992160011 (patch) | |
tree | 045a24ca855a55d6d5ae04994712c35a7de47d66 | |
parent | e9fe57d21a973a32460c6871e701981698f05d16 (diff) | |
download | perl-URPM-a056e218cd7d87e10e8f546fe20d02e992160011.tar perl-URPM-a056e218cd7d87e10e8f546fe20d02e992160011.tar.gz perl-URPM-a056e218cd7d87e10e8f546fe20d02e992160011.tar.bz2 perl-URPM-a056e218cd7d87e10e8f546fe20d02e992160011.tar.xz perl-URPM-a056e218cd7d87e10e8f546fe20d02e992160011.zip |
free the iterator *after* use
(otherwise it segfaults with 4.6.0-rc1, and i wonder how it worked before...)
-rw-r--r-- | URPM.xs | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -731,8 +731,7 @@ return_problems(rpmps ps, int translate_message, int raw_message) { if (ps && rpmpsNumProblems(ps) > 0) { #ifdef RPM_ORG rpmpsi iterator = rpmpsInitIterator(ps); - rpmpsFreeIterator(iterator); - while (rpmpsNextIterator(iterator)) { + while (rpmpsNextIterator(iterator) >= 0) { rpmProblem p = rpmpsGetProblem(iterator); #else int i; @@ -791,6 +790,9 @@ return_problems(rpmps ps, int translate_message, int raw_message) { XPUSHs(sv_2mortal(sv)); } } +#ifdef RPM_ORG + rpmpsFreeIterator(iterator); +#endif } PUTBACK; } |