]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
en50221: fix invalid htsmsg manipulation
authorAnssi Hannula <anssi.hannula@iki.fi>
Sat, 11 May 2019 22:48:43 +0000 (01:48 +0300)
committerJaroslav Kysela <perex@perex.cz>
Mon, 20 May 2019 16:41:40 +0000 (18:41 +0200)
htsmsg_add_msg() frees the provided submsg and returns a new pointer to
it.

Fix code in getmenutext() to use the returned pointer instead of the
now invalid original pointer.

src/input/mpegts/en50221/en50221_apps.c

index a948bc1471043b9f91ae17a68b68438c3850861c..e89d8fcf7d3969b53a4066a1450dfb72de318900 100644 (file)
@@ -501,7 +501,7 @@ getmenutext
         c = htsmsg_get_list(app->cia_menu, key);
         if (c == NULL) {
           c = htsmsg_create_list();
-          htsmsg_add_msg(app->cia_menu, key, c);
+          c = htsmsg_add_msg(app->cia_menu, key, c);
         }
         tvhtrace(LS_EN50221, "%s:  add to %s '%s'", app->cia_name, key, txt);
         htsmsg_add_str(c, NULL, txt);