Make sure query response is cleared if we happen to bail out early. Fixed ticket #145
This commit is contained in:
parent
22a3957af7
commit
b4f4b80269
1 changed files with 4 additions and 6 deletions
10
src/epg.c
10
src/epg.c
|
@ -622,11 +622,12 @@ epg_query0(epg_query_result_t *eqr, channel_t *ch, channel_tag_t *ct,
|
|||
{
|
||||
channel_tag_mapping_t *ctm;
|
||||
time_t now;
|
||||
|
||||
time(&now);
|
||||
|
||||
regex_t preg0, *preg;
|
||||
|
||||
lock_assert(&global_lock);
|
||||
memset(eqr, 0, sizeof(epg_query_result_t));
|
||||
time(&now);
|
||||
|
||||
if(title != NULL) {
|
||||
if(regcomp(&preg0, title, REG_ICASE | REG_EXTENDED | REG_NOSUB))
|
||||
return;
|
||||
|
@ -635,9 +636,6 @@ epg_query0(epg_query_result_t *eqr, channel_t *ch, channel_tag_t *ct,
|
|||
preg = NULL;
|
||||
}
|
||||
|
||||
lock_assert(&global_lock);
|
||||
memset(eqr, 0, sizeof(epg_query_result_t));
|
||||
|
||||
if(ch != NULL && ct == NULL) {
|
||||
epg_query_add_channel(eqr, ch, ecg, preg, now);
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue