From 0413253535483006c8686520a48238a8983fa3a5 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 22 Nov 2005 11:16:25 +0000 Subject: Plug potential memory leak... --- generic/tkSelect.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generic/tkSelect.c b/generic/tkSelect.c index 4d8617e..c35a47c 100644 --- a/generic/tkSelect.c +++ b/generic/tkSelect.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkSelect.c,v 1.18 2005/11/17 16:21:56 dkf Exp $ + * RCS: @(#) $Id: tkSelect.c,v 1.19 2005/11/22 11:16:25 dkf Exp $ */ #include "tkInt.h" @@ -1499,6 +1499,7 @@ TkSelDefaultSelection( } length = Tcl_DStringLength(&ds); if (length >= maxBytes) { + Tcl_DStringFree(&ds); return -1; } memcpy(buffer, Tcl_DStringValue(&ds), (unsigned) (1+length)); -- cgit v0.12