mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed a memory leak in theme description handling
This commit is contained in:
parent
f3ea26c74f
commit
480afc6bc8
@ -720,6 +720,7 @@ Sascha Volkenandt <sascha@akv-soft.de>
|
|||||||
for suggesting to allow drawing "transparent" texts
|
for suggesting to allow drawing "transparent" texts
|
||||||
for suggesting to ignore unused "none" color entries in XPM files written by
|
for suggesting to ignore unused "none" color entries in XPM files written by
|
||||||
some broken graphics tools
|
some broken graphics tools
|
||||||
|
for fixing a memory leak in theme description handling
|
||||||
|
|
||||||
Malcolm Caldwell <malcolm.caldwell@ntu.edu.au>
|
Malcolm Caldwell <malcolm.caldwell@ntu.edu.au>
|
||||||
for modifying LOF handling to allow for C-band reception
|
for modifying LOF handling to allow for C-band reception
|
||||||
|
3
HISTORY
3
HISTORY
@ -2893,7 +2893,7 @@ Video Disk Recorder Revision History
|
|||||||
strings in order to avoid buffer overflows (thanks to Philip Lawatsch for
|
strings in order to avoid buffer overflows (thanks to Philip Lawatsch for
|
||||||
debugging a buffer overflow in eit.c).
|
debugging a buffer overflow in eit.c).
|
||||||
|
|
||||||
2004-06-13: Version 1.3.11
|
2004-06-18: Version 1.3.11
|
||||||
|
|
||||||
- In order to avoid problems on NPTL systems, VDR now checks for the presence
|
- In order to avoid problems on NPTL systems, VDR now checks for the presence
|
||||||
of NPTL at program start, and if it is, exists and tells the user to do
|
of NPTL at program start, and if it is, exists and tells the user to do
|
||||||
@ -2920,3 +2920,4 @@ Video Disk Recorder Revision History
|
|||||||
Recordings.TriggerUpdate() to trigger an update of the list of recordings.
|
Recordings.TriggerUpdate() to trigger an update of the list of recordings.
|
||||||
If some external tool manipulates the video directory, it can touch the file
|
If some external tool manipulates the video directory, it can touch the file
|
||||||
'.update' in the video directory to trigger an update of the list of recordings.
|
'.update' in the video directory to trigger an update of the list of recordings.
|
||||||
|
- Fixed a memory leak in theme description handling (thanks to Sascha Volkenandt).
|
||||||
|
4
osd.c
4
osd.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: osd.c 1.54 2004/06/12 13:59:12 kls Exp $
|
* $Id: osd.c 1.55 2004/06/15 20:29:42 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "osd.h"
|
#include "osd.h"
|
||||||
@ -773,7 +773,7 @@ void cTextScroller::DrawText(void)
|
|||||||
{
|
{
|
||||||
if (osd) {
|
if (osd) {
|
||||||
for (int i = 0; i < shown; i++)
|
for (int i = 0; i < shown; i++)
|
||||||
osd->DrawText(left, top + i * font->Height(), textWrapper.GetLine(offset + i), colorFg, colorBg, font, width);
|
osd->DrawText(left, top + i * font->Height(), textWrapper.GetLine(offset + i), colorFg, colorBg, font, width);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
6
themes.c
6
themes.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: themes.c 1.2 2004/05/22 10:30:06 kls Exp $
|
* $Id: themes.c 1.3 2004/06/18 15:05:07 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "themes.h"
|
#include "themes.h"
|
||||||
@ -114,8 +114,10 @@ bool cTheme::Load(const char *FileName, bool OnlyDescriptions)
|
|||||||
char *l = strchr(n, '.');
|
char *l = strchr(n, '.');
|
||||||
if (l)
|
if (l)
|
||||||
lang = I18nLanguageIndex(++l);
|
lang = I18nLanguageIndex(++l);
|
||||||
if (lang >= 0)
|
if (lang >= 0) {
|
||||||
|
free(descriptions[lang]);
|
||||||
descriptions[lang] = strdup(v);
|
descriptions[lang] = strdup(v);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
error = "invalid language code";
|
error = "invalid language code";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user