1.3.22: memory leaks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05 May 2005 Klaus Schmidinger <Klaus.Schmidinger@xxxxxxxxxx> wrote:
> Stefan Huelswitt wrote:
>> Hi,
>> while investigating VDR with valgrind and other memory tracing
>> tools, I found two places where memory leaks.
>> 
>> First is in dvbplayer.c, where the Action() code builds a frame
>> from the replayed file (readFrame). If the ringbuffer is already
>> full, this frame cannot be put immediately. If Empty() is called
>> in such a situation, the premade frame is lost.
>> Solution:
>> 
>> --- dvbplayer.c	2005-01-14 15:00:56.000000000 +0100
>> +++ dvbplayer.c	2005-03-26 21:41:23.000000000 +0100
>> @@ -296,6 +296,7 @@
>>       nonBlockingFileReader->Clear();
>>    if ((readIndex = backTrace->Get(playDir == pdForward)) < 0)
>>       readIndex = writeIndex;
>> +  delete readFrame;
>>    readFrame = NULL;
>>    playFrame = NULL;
>>    ringBuffer->Clear();
> 
> Very well spotted!
> 
> I believe the same should be done in cDvbPlayer::~cDvbPlayer()
> (just tested it, it also happens there).

True, but not as common as the other place.

What do you think about Daniels fix to the asprintf() problem?

Regards.

-- 
Stefan Huelswitt
s.huelswitt@xxxxxx  | http://www.muempf.de/


[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux