Index: generic/nsfInt.h =================================================================== diff -u -r70d242f602e1807f7ef67cf9d642bb78f059be44 -r511fca2017ee0cabbfef93bfb482cd165def8190 --- generic/nsfInt.h (.../nsfInt.h) (revision 70d242f602e1807f7ef67cf9d642bb78f059be44) +++ generic/nsfInt.h (.../nsfInt.h) (revision 511fca2017ee0cabbfef93bfb482cd165def8190) @@ -79,7 +79,8 @@ #endif #define DSTRING_INIT(dsPtr) Tcl_DStringInit(dsPtr); MEM_COUNT_ALLOC("DString",dsPtr) -#define DSTRING_FREE(dsPtr) Tcl_DStringFree(dsPtr); MEM_COUNT_FREE("DString",dsPtr) +#define DSTRING_FREE(dsPtr) \ + if ((dsPtr)->string != (dsPtr)->staticSpace) {Tcl_DStringFree(dsPtr);} MEM_COUNT_FREE("DString",dsPtr) #if USE_ASSOC_DATA # define RUNTIME_STATE(interp) ((NsfRuntimeState*)Tcl_GetAssocData((interp), "NsfRuntimeState", NULL))