Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
api epg: fix api_epg_grid query - eq.lang must be allocated
  • Loading branch information
perexg committed Jan 4, 2016
1 parent 2d9ff18 commit 4631e91
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/api/api_epg.c
Expand Up @@ -297,7 +297,9 @@ api_epg_grid

memset(&eq, 0, sizeof(eq));

eq.lang = lang = access_get_lang(perm, htsmsg_get_str(args, "lang"));
lang = access_get_lang(perm, htsmsg_get_str(args, "lang"));
if (lang)
eq.lang = strdup(lang);
str = htsmsg_get_str(args, "title");
if (str)
eq.stitle = strdup(str);
Expand Down Expand Up @@ -443,6 +445,7 @@ api_epg_grid
pthread_mutex_unlock(&global_lock);

epg_query_free(&eq);
free(lang);

/* Build response */
*resp = htsmsg_create_map();
Expand Down

0 comments on commit 4631e91

Please sign in to comment.