diff options
author | Christian Wieninger <cwieninger@gmx.de> | 2011-08-21 16:40:58 +0200 |
---|---|---|
committer | Christian Wieninger <cwieninger@gmx.de> | 2011-08-21 16:40:58 +0200 |
commit | b00f9805d223f71172293cb32e26edbc6f8fc1b2 (patch) | |
tree | 0d8343a4b60d3c0403516a3088e03d385ba701b2 /blacklist.c | |
parent | 548a267c4458845485d41480ddec7c5c4ff28778 (diff) | |
download | vdr-plugin-epgsearch-b00f9805d223f71172293cb32e26edbc6f8fc1b2.tar.gz vdr-plugin-epgsearch-b00f9805d223f71172293cb32e26edbc6f8fc1b2.tar.bz2 |
fixed some memory leaks
Diffstat (limited to 'blacklist.c')
-rw-r--r-- | blacklist.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/blacklist.c b/blacklist.c index 484b464..1ffa8a1 100644 --- a/blacklist.c +++ b/blacklist.c @@ -88,7 +88,7 @@ cBlacklist::~cBlacklist(void) { cSearchExtCat *SearchExtCat = SearchExtCats.First(); int index = 0; - while (SearchExtCat && index < (int)(sizeof(catvalues)/sizeof(char*))) + while (SearchExtCat) { free(catvalues[index]); SearchExtCat = SearchExtCats.Next(SearchExtCat); @@ -102,12 +102,10 @@ cBlacklist::~cBlacklist(void) cBlacklist& cBlacklist::operator= (const cBlacklist &Blacklist) { memcpy(this, &Blacklist, sizeof(*this)); - catvalues = (char**) malloc(SearchExtCats.Count() * sizeof(char*)); cSearchExtCat *SearchExtCat = SearchExtCats.First(); int index = 0; while (SearchExtCat) { - catvalues[index] = (char*)malloc(MaxFileName); *catvalues[index] = 0; strcpy(catvalues[index], Blacklist.catvalues[index]); SearchExtCat = SearchExtCats.Next(SearchExtCat); |