Comment 9 for bug 215729

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 215729] Re: Seahorse fails to import keys

On Wed, Apr 16, 2008 at 03:06:56AM -0000, Mackenzie Morgan wrote:
> Where's the memory leak? The first version that was attached didn't
> have hexfpr being freed, but all subsequent ones did.

The previous patch showed hexfpr being freed once at the end of the
function - but being re-malloc()ed repeatedly inside a loop, overwriting the
pointer to the previously-malloc()ed memory each time.

A static buffer is much simpler here, given that the amount of data we need
to pass is small and constant.