diff options
Diffstat (limited to 'epgsearchcats.c')
-rw-r--r-- | epgsearchcats.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/epgsearchcats.c b/epgsearchcats.c index 3c628ec..5458369 100644 --- a/epgsearchcats.c +++ b/epgsearchcats.c @@ -94,8 +94,12 @@ bool cSearchExtCat::Parse(const char *s) while(pstrToken) { nvalues++; - values = (char**) realloc(values, nvalues * sizeof(char*)); - values[nvalues-1] = strdup(pstrToken); + char **tmp = (char**) realloc(values, nvalues * sizeof(char*)); + if (tmp) + { + values=tmp; + values[nvalues-1] = strdup(pstrToken); + } pstrToken=strtok_r(NULL, ",", &pptr); } free(szBuffer); |