summaryrefslogtreecommitdiffstats
path: root/win/tclWinReg.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-19 14:55:42 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-19 14:55:42 (GMT)
commitb4274908c29bc7b8e88b1af0b34ba947453ccdbc (patch)
tree8cd7e1d637b5f9d8806ce373b20d70cec072535d /win/tclWinReg.c
parent9e832d51f5cf8e1317b58eae1f0b7ded6e0b198d (diff)
downloadtcl-b4274908c29bc7b8e88b1af0b34ba947453ccdbc.zip
tcl-b4274908c29bc7b8e88b1af0b34ba947453ccdbc.tar.gz
tcl-b4274908c29bc7b8e88b1af0b34ba947453ccdbc.tar.bz2
Plug memory leak, part of [Bug #3362446]
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 3960fda..7d50996 100644
--- a/win/tclWinReg.c
+++ b/win/tclWinReg.c
@@ -595,6 +595,8 @@ GetKeyNames(
}
if (result == TCL_OK) {
Tcl_SetObjResult(interp, resultPtr);
+ } else {
+ Tcl_DecrRefCount(resultPtr); /* BUGFIX: Don't leak on failure. */
}
ckfree(buffer);