[libbluray-devel] Fixed crash in meta_free()
Ferdinand Holzer
git at videolan.org
Fri Aug 17 12:53:24 CEST 2012
libbluray | branch: master | Ferdinand Holzer <holzer at grg21.ac.at> | Fri Aug 17 13:05:08 2012 +0300| [5e8030fda6b06d891bf897e36bab5f7811148936] | committer: hpi1
Fixed crash in meta_free()
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=5e8030fda6b06d891bf897e36bab5f7811148936
---
src/libbluray/bdnav/meta_parse.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/libbluray/bdnav/meta_parse.c b/src/libbluray/bdnav/meta_parse.c
index 313057d..21e3171 100644
--- a/src/libbluray/bdnav/meta_parse.c
+++ b/src/libbluray/bdnav/meta_parse.c
@@ -217,18 +217,19 @@ void meta_free(META_ROOT **p)
uint8_t i;
for (i = 0; i < (*p)->dl_count; i++) {
uint32_t t;
- for (t=0; i < (*p)->dl_entries[i].toc_count; t++) {
+ for (t = 0; t < (*p)->dl_entries[i].toc_count; t++) {
X_FREE((*p)->dl_entries[i].toc_entries[t].title_name);
- X_FREE((*p)->dl_entries[i].toc_entries);
}
- for (t = 0; i < (*p)->dl_entries[i].thumb_count; t++) {
+ for (t = 0; t < (*p)->dl_entries[i].thumb_count; t++) {
X_FREE((*p)->dl_entries[i].thumbnails[t].path);
- X_FREE((*p)->dl_entries[i].thumbnails);
}
+ X_FREE((*p)->dl_entries[i].toc_entries);
+ X_FREE((*p)->dl_entries[i].thumbnails);
X_FREE((*p)->dl_entries[i].filename);
X_FREE((*p)->dl_entries[i].di_name);
X_FREE((*p)->dl_entries[i].di_alternative);
}
+ X_FREE((*p)->dl_entries);
X_FREE(*p);
}
}
More information about the libbluray-devel
mailing list