external/libgltf/UnpackedTarball_libgltf.mk | 1 external/libgltf/patches/stop_a_potential_memory_leak.patch | 27 ++++++++++++ 2 files changed, 28 insertions(+)
New commits: commit 8ea270213ba95544011fc3a79cc33f0511f6c62e Author: Zolnai Tamás <tamas.zol...@collabora.com> Date: Fri Jul 4 16:46:23 2014 +0200 libgltf: Stop a memory leak Change-Id: I7f3f5cfcdc368907670d58b07300889ea8452340 diff --git a/external/libgltf/UnpackedTarball_libgltf.mk b/external/libgltf/UnpackedTarball_libgltf.mk index 2e027ad..f1e618c 100644 --- a/external/libgltf/UnpackedTarball_libgltf.mk +++ b/external/libgltf/UnpackedTarball_libgltf.mk @@ -32,6 +32,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libgltf,\ external/libgltf/patches/fix_package_file.patch \ external/libgltf/patches/comma_at_end_of_enumerator_list.patch \ external/libgltf/patches/extra_semicolon.patch \ + external/libgltf/patches/stop_a_potential_memory_leak.patch \ )) # vim: set noet sw=4 ts=4: diff --git a/external/libgltf/patches/stop_a_potential_memory_leak.patch b/external/libgltf/patches/stop_a_potential_memory_leak.patch new file mode 100644 index 0000000..1dff583 --- /dev/null +++ b/external/libgltf/patches/stop_a_potential_memory_leak.patch @@ -0,0 +1,27 @@ +changeset: 1068:ef62f9d46016 +branch: improvement +parent: 1065:ce62a560f347 +user: LeiQu +date: Tue Jul 01 14:46:15 2014 +0800 +summary: Fix the bug of memory leak + +diff -ur libgltf.org/src/LoadScene.cpp libgltf/src/LoadScene.cpp +--- libgltf.org/src/LoadScene.cpp 2014-07-04 16:35:53.702409179 +0200 ++++ libgltf/src/LoadScene.cpp 2014-07-04 16:35:59.926408911 +0200 +@@ -1052,10 +1052,14 @@ + std::string nodeId; + for (; it != itEnd; ++it) + { +- Animation* pAnimation = new Animation(); + boost::property_tree::ptree pAnimTree = it->second; + nodeId = parseChannel(pAnimTree); +- parsePara(pAnimTree, pAnimation, nodeId); ++ if (nodeId.empty()) ++ { ++ continue; ++ } ++ Animation* pAnimation = new Animation(); ++ parsePara(pAnimTree, pAnimation, nodeId); + this->pScene->insertAnimMap(nodeId, pAnimation); + } + return true;
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits