summaryrefslogtreecommitdiffstats
path: root/generic/tkSelect.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkSelect.c')
-rw-r--r--generic/tkSelect.c3
1 files changed, 2 insertions, 1 deletions
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));