From 11b971f405cf4f1a1bb51bb3ff115ca76707c3eb Mon Sep 17 00:00:00 2001 From: Amarnath Valluri Date: Thu, 16 Jun 2016 15:45:02 +0300 Subject: [PATCH] go.cxx: Fix use of a freed variable Signed-off-by: Amarnath Valluri --- Source/Modules/go.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Modules/go.cxx b/Source/Modules/go.cxx index 6013fa15b..7fa9b2670 100644 --- a/Source/Modules/go.cxx +++ b/Source/Modules/go.cxx @@ -4176,7 +4176,6 @@ private: Wrapper *dummy = NewWrapper(); emit_attach_parmmaps(parms, dummy); - DelWrapper(dummy); Swig_typemap_attach_parms("gotype", parms, NULL); Swig_typemap_attach_parms("imtype", parms, NULL); @@ -4233,6 +4232,8 @@ private: Swig_typemap_attach_parms("goin", parms, dummy); Swig_typemap_attach_parms("goargout", parms, dummy); + DelWrapper(dummy); + if (!is_ignored) { // We use an interface to see if this method is defined in Go. Printv(f_go_wrappers, "type ", interface_name, " interface {\n", NULL);