From a1c695bb97b9a9db3e5cc1a94162083e573301e3 Mon Sep 17 00:00:00 2001 From: hpi1 Date: Mon, 3 May 2010 13:36:36 +0000 Subject: [PATCH] Fixed leak (old NAV_TITLE was not disposed when opening new one) --- src/bluray.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bluray.c b/src/bluray.c index bb10a361..8226d614 100644 --- a/src/bluray.c +++ b/src/bluray.c @@ -524,10 +524,15 @@ int bd_select_title(BLURAY *bd, uint32_t title_idx) DEBUG(DBG_BLURAY, "Invalid title index %d! (%p)\n", title_idx, bd); return 0; } + + if (bd->title) { + nav_title_close(bd->title); + } + f_name = bd->title_list->title_info[title_idx].name; bd->title = nav_title_open(bd->device_path, f_name); if (bd->title == NULL) { - DEBUG(DBG_BLURAY | DBG_CRIT, "Unable to open title %s! (%p)\n", + DEBUG(DBG_BLURAY | DBG_CRIT, "Unable to open title %s! (%p)\n", f_name, bd); return 0; } -- GitLab