summaryrefslogtreecommitdiffstats
path: root/win/tclWinReg.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tclWinReg.c')
-rw-r--r--win/tclWinReg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/win/tclWinReg.c b/win/tclWinReg.c
index f2ac367..13216f3 100644
--- a/win/tclWinReg.c
+++ b/win/tclWinReg.c
@@ -671,6 +671,8 @@ GetKeyNames(
}
if (result == TCL_OK) {
Tcl_SetObjResult(interp, resultPtr);
+ } else {
+ Tcl_DecrRefCount(resultPtr); /* BUGFIX: Don't leak on failure. */
}
ckfree(buffer);