diff options
author | patthoyts <patthoyts> | 2005-03-05 22:06:51 +0000 |
---|---|---|
committer | patthoyts <patthoyts> | 2005-03-05 22:06:51 +0000 |
commit | b54a13021a55c4d608999ac8d02d9c6714746f5e (patch) | |
tree | a0374c03c2eae90cf3995c500ff8b40e54dd6ee8 | |
parent | 14f723c4d8e7eeeb8fee0f7df7666440d50b9203 (diff) | |
download | jimtcl-b54a13021a55c4d608999ac8d02d9c6714746f5e.zip jimtcl-b54a13021a55c4d608999ac8d02d9c6714746f5e.tar.gz jimtcl-b54a13021a55c4d608999ac8d02d9c6714746f5e.tar.bz2 |
Free an objects internal representation before freeing the string rep.
-rw-r--r-- | jim.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,7 +1,7 @@ /* Jim - A small embeddable Tcl interpreter * Copyright 2005 Salvatore Sanfilippo <antirez@invece.org> * - * $Id: jim.c,v 1.66 2005/03/05 15:04:13 antirez Exp $ + * $Id: jim.c,v 1.67 2005/03/05 22:06:51 patthoyts Exp $ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1663,13 +1663,13 @@ void Jim_FreeObj(Jim_Interp *interp, Jim_Obj *objPtr) if (objPtr->refCount == -1) { Jim_Panic("Object %p double freed!", objPtr); } + /* Free the internal representation */ + Jim_FreeIntRep(interp, objPtr); /* Free the string representation */ if (objPtr->bytes != NULL) { if (objPtr->bytes != JimEmptyStringRep) Jim_Free(objPtr->bytes); } - /* Free the internal representation */ - Jim_FreeIntRep(interp, objPtr); /* Unlink the object from the live objects list */ if (objPtr->prevObjPtr) objPtr->prevObjPtr->nextObjPtr = objPtr->nextObjPtr; |