From 45fc06cf113fece0b72b40b58173470d5ea89994 Mon Sep 17 00:00:00 2001 From: Cary R Date: Sun, 13 Dec 2015 18:56:06 -0800 Subject: [PATCH] A format is a vpiStringVal not vpiStringVar, fix memory leak --- vpi/vhdl_textio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vpi/vhdl_textio.c b/vpi/vhdl_textio.c index f770123a8..e6a9a8411 100644 --- a/vpi/vhdl_textio.c +++ b/vpi/vhdl_textio.c @@ -684,7 +684,7 @@ static PLI_INT32 ivlh_read_calltf(ICARUS_VPI_CONST PLI_BYTE8*name) vpi_put_value(varh, &val, 0, vpiNoDelay); /* Clean up */ - if(val.format == vpiStringVar) + if(val.format == vpiStringVal) free(val.value.str); else if(val.format == vpiVectorVal) free(val.value.vector);