From dcda566ce664ce35fa1b1aaa24ce2cd0ac52eb97 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 26 Apr 2016 19:56:34 +0200 Subject: [PATCH] Remove unnecessary memory allocation from substituteResolvedType() Don't allocate memory just to leak it, SwigType_typedef_resolve_all() already returns a copy we can use. --- Source/Modules/c.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Modules/c.cxx b/Source/Modules/c.cxx index 47a7c8669..834480751 100644 --- a/Source/Modules/c.cxx +++ b/Source/Modules/c.cxx @@ -304,7 +304,7 @@ public: * ----------------------------------------------------------------------------- */ void substituteResolvedType(output_target target, SwigType *pt, String *tm) { - SwigType *type = Copy(SwigType_typedef_resolve_all(pt)); + SwigType *type = SwigType_typedef_resolve_all(pt); SwigType *strippedtype = SwigType_strip_qualifiers(type); if (Strstr(tm, "$resolved_type")) {