From patchwork Sat Apr 29 12:37:03 2006 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Grimm X-Patchwork-Id: 12290 Received: from moutng.kundenserver.de ([212.227.126.177]) by www.linuxtv.org with esmtp (Exim 4.50) id 1FZoh6-0002xv-LE for vdr@linuxtv.org; Sat, 29 Apr 2006 14:37:04 +0200 Received: from [84.184.28.183] (helo=[192.168.30.10]) by mrelayeu.kundenserver.de (node=mrelayeu9) with ESMTP (Nemesis), id 0ML2xA-1FZoh60SMa-0000Vi; Sat, 29 Apr 2006 14:37:04 +0200 Message-ID: <44535DEF.5010106@e-tobi.net> Date: Sat, 29 Apr 2006 14:37:03 +0200 From: Tobias Grimm User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en MIME-Version: 1.0 To: VDR Mailing List Subject: Re: [vdr] [ANNOUNCE] VDR developer version 1.3.49 - Memleak References: <44521D96.3060101@cadsoft.de> <44534654.1030502@e-tobi.net> <445350F2.5080001@cadsoft.de> In-Reply-To: <445350F2.5080001@cadsoft.de> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:3a660adf8439ddc7be7d699eb4083112 X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Apr 2006 12:37:04 -0000 Status: O X-Status: X-Keywords: X-UID: 9144 Klaus Schmidinger wrote: > Thanks - applied for version 1.4.0. I'm afraid I've found another minor memory leak. Valgrind would really be worth it's money, if it wouldn't be free :-) When playing back a recording, the file handle gets closed, but not the cUnbufferedFile object. I'm not sure why a distinction is made between recording and not recording when closing the file, so I just use CloseVideoFile() in both cases, which correctly frees the object. Hope this is correct. See attached patch. Regards, Tobias --- vdr-1.3.49.orig/recording.c +++ vdr-1.3.49/recording.c @@ -1436,7 +1436,7 @@ void cFileName::Close(void) { if (file) { - if ((record && CloseVideoFile(file) < 0) || (!record && file->Close() < 0)) + if (CloseVideoFile(file)) LOG_ERROR_STR(fileName); file = NULL; }