go.cxx: Fix use of a freed variable

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
This commit is contained in:
Amarnath Valluri 2016-06-16 15:45:02 +03:00
commit 11b971f405

View file

@ -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);