From 8d001a9216f0063de65678b369f3cb22752473f1 Mon Sep 17 00:00:00 2001 From: Vince Darley Date: Fri, 28 Sep 2001 11:36:08 +0000 Subject: [PATCH] fix --- generic/vfs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/generic/vfs.c b/generic/vfs.c index 83eca9f..428a05e 100644 --- a/generic/vfs.c +++ b/generic/vfs.c @@ -42,6 +42,9 @@ static int Vfs_RemoveVolume _ANSI_ARGS_((Tcl_Obj*)); * NULL if there are none. To improve Tcl's efficiency, * when there are no volumes, we keep this NULL rather * than as an empty list. + * + * We keep a refCount on this object whenever it is + * non-NULL. */ static Tcl_Obj *vfsVolumes = NULL; @@ -1182,6 +1185,7 @@ Vfs_RemoveVolume(volume) if (Tcl_IsShared(vfsVolumes)) { Tcl_Obj *oldVols = vfsVolumes; vfsVolumes = Tcl_DuplicateObj(oldVols); + Tcl_IncrRefCount(vfsVolumes); Tcl_DecrRefCount(oldVols); } /* Remove the element */ -- 2.23.0