From 8e0711cbc63ceb6b0adcc1a2ec4133b0fa198a25 Mon Sep 17 00:00:00 2001 From: Oliver Buchtala Date: Sat, 8 Sep 2012 00:49:44 +0000 Subject: [PATCH] Fix memory related bug in generalized javascript emitter. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/oliverb-javascript-v8@13752 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Modules/javascript_emitter.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Modules/javascript_emitter.cxx b/Source/Modules/javascript_emitter.cxx index 7b49aaf5d..b9446663a 100644 --- a/Source/Modules/javascript_emitter.cxx +++ b/Source/Modules/javascript_emitter.cxx @@ -107,7 +107,7 @@ int JSEmitter::EmitWrapperFunction(Node* n) int ret = SWIG_OK; current_wrapper = NewWrapper(); - Setattr(n, "wrap:name", Getattr(n, "sym:name")); + Setattr(n, "wrap:name", NewString(Getattr(n, "sym:name"))); String* kind = Getattr(n, "kind");