diff options
author | donal.k.fellows@manchester.ac.uk <dkf> | 2005-11-22 11:16:25 (GMT) |
---|---|---|
committer | donal.k.fellows@manchester.ac.uk <dkf> | 2005-11-22 11:16:25 (GMT) |
commit | f7acf13fe64a7fbddbaaa2012ff92b44b583925a (patch) | |
tree | cb87969eb0193f05ae2fa4e90ef9fbd32164f3ef /generic/tkSelect.c | |
parent | 8e77752538bfc6660ea6e87ca40998605500cf56 (diff) | |
download | tk-f7acf13fe64a7fbddbaaa2012ff92b44b583925a.zip tk-f7acf13fe64a7fbddbaaa2012ff92b44b583925a.tar.gz tk-f7acf13fe64a7fbddbaaa2012ff92b44b583925a.tar.bz2 |
Plug potential memory leak...
Diffstat (limited to 'generic/tkSelect.c')
-rw-r--r-- | generic/tkSelect.c | 3 |
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)); |