summaryrefslogtreecommitdiffstats
path: root/win/tclWinReg.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-19 14:57:50 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-19 14:57:50 (GMT)
commit9ff8e40fff5458c0dd6e606d79a127309cd985a9 (patch)
treef45aa27290e2d133a06589a3a6418e5a28d74fd0 /win/tclWinReg.c
parent0776c036bc35c367549578f6293956a80f20ac6e (diff)
parentb4274908c29bc7b8e88b1af0b34ba947453ccdbc (diff)
downloadtcl-9ff8e40fff5458c0dd6e606d79a127309cd985a9.zip
tcl-9ff8e40fff5458c0dd6e606d79a127309cd985a9.tar.gz
tcl-9ff8e40fff5458c0dd6e606d79a127309cd985a9.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 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);