Fix memory leak when displaying a SV string variable.

This commit is contained in:
Cary R 2013-01-02 18:30:59 -08:00
parent 927edf03d6
commit 4407bc1d50
1 changed files with 2 additions and 1 deletions

View File

@ -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: