From 71ff9e70eab4913074bf79774e16c2db8fc60646 Mon Sep 17 00:00:00 2001 From: Cary R Date: Tue, 29 Dec 2015 12:45:32 -0800 Subject: [PATCH] Fix valgrind release code to work with new scope definition --- vvp/vpi_scope.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vvp/vpi_scope.cc b/vvp/vpi_scope.cc index 8634f84e8..ab4b56d75 100644 --- a/vvp/vpi_scope.cc +++ b/vvp/vpi_scope.cc @@ -56,7 +56,7 @@ static unsigned class_list_count = 0; static void delete_sub_scopes(__vpiScope *scope) { - for (unsigned idx = 0; idx < scope->nintern; idx += 1) { + for (unsigned idx = 0; idx < scope->intern.size(); idx += 1) { vpiHandle item = (scope->intern)[idx]; __vpiScope*lscope = static_cast<__vpiScope*>(item); switch(item->get_type_code()) { @@ -132,7 +132,7 @@ static void delete_sub_scopes(__vpiScope *scope) break; } } - free(scope->intern); + scope->intern.clear(); /* Save any class definitions to clean up later. */ map::iterator citer;