From 92c2dddc8dde11c773828d152e0e49ef9c920be9 Mon Sep 17 00:00:00 2001 From: mdejong Date: Sat, 15 Jun 2002 21:02:20 +0000 Subject: * generic/tkOption.c (Tk_GetOption): Allocate memory with ckalloc not malloc. This keeps Tk from erroring out when built with TCL_MEM_DEBUG. --- ChangeLog | 7 +++++++ generic/tkOption.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9934df6..a6ba6e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-06-14 Mo DeJong + + * generic/tkOption.c (Tk_GetOption): Allocate + memory with ckalloc not malloc. This keeps + Tk from erroring out when built with + TCL_MEM_DEBUG. + 2002-06-14 Jeff Hobbs * generic/tkBind.c (HandleEventGenerate): diff --git a/generic/tkOption.c b/generic/tkOption.c index 64454f2..d562e6c 100644 --- a/generic/tkOption.c +++ b/generic/tkOption.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkOption.c,v 1.12 2002/04/12 07:29:55 hobbs Exp $ + * RCS: @(#) $Id: tkOption.c,v 1.13 2002/06/15 21:02:20 mdejong Exp $ */ #include "tkPort.h" @@ -555,7 +555,7 @@ Tk_GetOption(tkwin, name, className) */ classNameLength = (unsigned int)(masqName - name); - masqClass = (char *)malloc(classNameLength + 1); + masqClass = (char *)ckalloc(classNameLength + 1); strncpy(masqClass, name, classNameLength); masqClass[classNameLength] = '\0'; -- cgit v0.12