From 4407bc1d500442feec11119e8ff1cf0355559c77 Mon Sep 17 00:00:00 2001 From: Cary R Date: Wed, 2 Jan 2013 18:30:59 -0800 Subject: [PATCH] Fix memory leak when displaying a SV string variable. --- vpi/sys_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vpi/sys_display.c b/vpi/sys_display.c index 9151051d9..5ed2000ac 100644 --- a/vpi/sys_display.c +++ b/vpi/sys_display.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2012 Stephen Williams (steve@icarus.com) + * Copyright (c) 1999-2013 Stephen Williams (steve@icarus.com) * * This source code is free software; you can redistribute it * and/or modify it in source code form under the terms of the GNU @@ -974,6 +974,7 @@ static char *get_display(unsigned int *rtnsz, const struct strobe_cb_info *info) free(fmt); rtn = realloc(rtn, (size+width)*sizeof(char)); memcpy(rtn+size-1, result, width); + free(result); break; case vpiSysFuncCall: