Permalink
Browse files

Fix memory leak when displaying a SV string variable.

  • Loading branch information...
1 parent 927edf0 commit 4407bc1d500442feec11119e8ff1cf0355559c77 @caryr caryr committed Jan 3, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 vpi/sys_display.c
View
@@ -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:

0 comments on commit 4407bc1

Please sign in to comment.