Fixed memory leak in DPI function calls
authorClifford Wolf <clifford@clifford.at>
Thu, 21 Aug 2014 11:09:47 +0000 (13:09 +0200)
committerClifford Wolf <clifford@clifford.at>
Thu, 21 Aug 2014 11:09:47 +0000 (13:09 +0200)
frontends/ast/simplify.cc

index 19f1d0554474ab8c147e5e8efb01481f83c2dd96..5cf64310b5d19783d170fe58adb06daf76329c9c 100644 (file)
@@ -1467,6 +1467,10 @@ skip_dynamic_range_lvalue_expansion:;
                                }
 
                                newNode = dpi_call(rtype, fname, argtypes, args);
+
+                               for (auto arg : args)
+                                       delete arg;
+
                                goto apply_newNode;
                        }