summaryrefslogtreecommitdiff
path: root/jim.c
diff options
context:
space:
mode:
authorantirez <antirez>2005-03-07 20:53:32 +0000
committerantirez <antirez>2005-03-07 20:53:32 +0000
commit5bf31c1165ac894cc6133c3c69513c5884ba9b59 (patch)
tree853dd59715cf17316436cc2ec174926e3e35b03a /jim.c
parentcd85db16d0d78a592b2d9e55787ad8a42b6ae6ec (diff)
Fixed a memory leak introduced with the last callframe caching code
commit.
Diffstat (limited to 'jim.c')
-rw-r--r--jim.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/jim.c b/jim.c
index 9f9a72b..dff3305 100644
--- a/jim.c
+++ b/jim.c
@@ -1,7 +1,7 @@
/* Jim - A small embeddable Tcl interpreter
* Copyright 2005 Salvatore Sanfilippo <antirez@invece.org>
*
- * $Id: jim.c,v 1.75 2005/03/07 20:34:16 antirez Exp $
+ * $Id: jim.c,v 1.76 2005/03/07 20:53:32 antirez Exp $
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -3823,6 +3823,8 @@ void Jim_FreeInterp(Jim_Interp *i)
cf = i->freeFramesList;
while(cf) {
nextcf = cf->nextFramePtr;
+ if (cf->vars.table != NULL)
+ Jim_Free(cf->vars.table);
free(cf);
cf = nextcf;
}