[Media_api] two fixed memory leaks in portmidi

Andreas Micheler Andreas.Micheler at student.uni-augsburg.de
Mon Jan 2 18:31:50 PST 2006


Hallo All,

I've tried out wxMidi, a C++ wrapper of Cecilio Salmeroon, which uses
the PortMidi library.

I have found and fixed two memory leaks
with the following additional code at the end of pm_winmm_term() in
pmwinmm.c:

     if (midi_in_caps)
    {   pm_free(midi_in_caps);
       midi_in_caps=0;
    }
    if (midi_out_caps)
    {   pm_free(midi_out_caps);
       midi_out_caps=0;
    }

The if's and the zeroing is neccessary
because pm_winmm_term() is strangly executed two times,
which is a bit odd, I think.

My system is WinXP, MSVC5.

I hope this helps!
Greetings,
Andreas




More information about the media_api mailing list