diff options
author | dkf <dkf@noemail.net> | 2005-11-22 11:16:24 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2005-11-22 11:16:24 (GMT) |
commit | 02519dfd08d2149cdf090d8f5b0b2011a1871c50 (patch) | |
tree | cb87969eb0193f05ae2fa4e90ef9fbd32164f3ef | |
parent | fa789e134ad9284fd98a90281c1ea17c27b772f7 (diff) | |
download | tk-02519dfd08d2149cdf090d8f5b0b2011a1871c50.zip tk-02519dfd08d2149cdf090d8f5b0b2011a1871c50.tar.gz tk-02519dfd08d2149cdf090d8f5b0b2011a1871c50.tar.bz2 |
Plug potential memory leak...
FossilOrigin-Name: 911c8564376ab2fd9759975edc042ade8875b914
-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)); |