diff options
author | pooryorick <com.digitalsmarties@pooryorick.com> | 2023-03-26 15:02:55 (GMT) |
---|---|---|
committer | pooryorick <com.digitalsmarties@pooryorick.com> | 2023-03-26 15:02:55 (GMT) |
commit | 2002e0f0f0b3cb11791ef5c3c7d651af68d82d84 (patch) | |
tree | 03cf20c43856ac7c161b042f19ee2d837195b676 | |
parent | 2122f0eb09d729bfbfbdbbf1540fa26bbfa42453 (diff) | |
download | tcl-2002e0f0f0b3cb11791ef5c3c7d651af68d82d84.zip tcl-2002e0f0f0b3cb11791ef5c3c7d651af68d82d84.tar.gz tcl-2002e0f0f0b3cb11791ef5c3c7d651af68d82d84.tar.bz2 |
Fix for [6d4e9d1af5bf5b7d]: Memory leak: SetFsPathFromAny, assisted by the
global literal table, causes a Tcl_Obj to reference itself.
-rw-r--r-- | generic/tclPathObj.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 87aed3a..aefc84f 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -2350,6 +2350,8 @@ SetFsPathFromAny( fsPathPtr = (FsPath *)ckalloc(sizeof(FsPath)); if (transPtr == pathPtr) { + Tcl_GetStringFromObj(pathPtr, NULL); + TclFreeInternalRep(pathPtr); transPtr = Tcl_DuplicateObj(pathPtr); fsPathPtr->filesystemEpoch = 0; } else { |