summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-07-06 15:08:43 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-07-12 04:44:45 +0200
commitdfdc9f5ba4493369a0c6fb3a1d7c5781deeb5bc2 (patch)
tree155efa403b53994693328c4386183157e634bd4b /external
parent664fb35ab522c40d298012922f059f6d48006355 (diff)
fix memory leak in collada2gltf
Change-Id: I7d4a00d94cf97e988847f11ded0de2dc0cb77828
Diffstat (limited to 'external')
-rw-r--r--external/collada2gltf/UnpackedTarball_collada2gltf.mk1
-rw-r--r--external/collada2gltf/patches/collada2gltf.fix-memory-leak2.patch.118
2 files changed, 19 insertions, 0 deletions
diff --git a/external/collada2gltf/UnpackedTarball_collada2gltf.mk b/external/collada2gltf/UnpackedTarball_collada2gltf.mk
index def81f89f69d..15a1a545cdcb 100644
--- a/external/collada2gltf/UnpackedTarball_collada2gltf.mk
+++ b/external/collada2gltf/UnpackedTarball_collada2gltf.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,collada2gltf,\
external/collada2gltf/patches/wrong_uri_usage.patch.1 \
external/collada2gltf/patches/collada2gltf.new-delete-mismatch.patch.1 \
external/collada2gltf/patches/collada2gltf.fix-memory-leak.patch.1 \
+ external/collada2gltf/patches/collada2gltf.fix-memory-leak2.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/collada2gltf/patches/collada2gltf.fix-memory-leak2.patch.1 b/external/collada2gltf/patches/collada2gltf.fix-memory-leak2.patch.1
new file mode 100644
index 000000000000..81b4db86f016
--- /dev/null
+++ b/external/collada2gltf/patches/collada2gltf.fix-memory-leak2.patch.1
@@ -0,0 +1,18 @@
+diff -ur collada2gltf.org/COLLADA2GLTFWriter.cpp collada2gltf/COLLADA2GLTFWriter.cpp
+--- collada2gltf.org/COLLADA2GLTFWriter.cpp 2014-07-06 06:42:01.305850400 +0200
++++ collada2gltf/COLLADA2GLTFWriter.cpp 2014-07-06 06:45:57.000840753 +0200
+@@ -75,10 +75,13 @@
+
+ COLLADAFW::Root root(&this->_loader, this);
+ this->_loader.registerExtraDataCallbackHandler(this->_extraDataHandler);
+- if (!root.loadDocument(asset->getInputFilePath()))
++ if (!root.loadDocument(asset->getInputFilePath())) {
++ delete _extraDataHandler;
+ return false;
++ }
+
+ asset->write();
++ delete _extraDataHandler;
+
+ return true;
+ }