summaryrefslogtreecommitdiffstats
path: root/libmenu/menu_chapsel.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmenu/menu_chapsel.c')
-rw-r--r--libmenu/menu_chapsel.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libmenu/menu_chapsel.c b/libmenu/menu_chapsel.c
index fb159eaeee..d1489549c2 100644
--- a/libmenu/menu_chapsel.c
+++ b/libmenu/menu_chapsel.c
@@ -27,6 +27,7 @@
#include "config.h"
+#include "talloc.h"
#include "m_struct.h"
#include "m_option.h"
#include "input/input.h"
@@ -111,7 +112,9 @@ static int fill_menu (menu_t* menu)
if ((e = calloc (1, sizeof (list_entry_t))) != NULL) {
e->cid = cid + 1;
e->p.next = NULL;
- e->p.txt = demuxer_chapter_display_name(demuxer, cid);
+ char *str = demuxer_chapter_display_name(demuxer, cid);
+ e->p.txt = strdup(str);
+ talloc_free(str);
start_time = demuxer_chapter_time(demuxer, cid, NULL);
if (start_time >= 0) {
char timestr[13];