Skip Menu |

This queue is for tickets about the Math-BigInt-GMP CPAN distribution.

Report information
The Basics
Id: 123807
Status: resolved
Priority: 0/
Queue: Math-BigInt-GMP

People
Owner: Nobody in particular
Requestors: DANAJ [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.6004
Fixed in: 1.6005



Subject: Memory leak in modinv
When testing other software using Test::Valgrind I found this leak. In GMP.xs, line 551 in _modinv, in the path where we return undefs, we should be doing: { /* Inverse doesn't exist. Return both values undefined. */ PUSHs ( &PL_sv_undef ); PUSHs ( &PL_sv_undef ); mpz_clear(*RETVAL); free(RETVAL); } Because we've allocated RETVAL but we're not returning it in any way, so it is leaked.