diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkImgPhoto.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index c9acc4d..6d5bfec 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -17,7 +17,7 @@ * Department of Computer Science, * Australian National University. * - * RCS: @(#) $Id: tkImgPhoto.c,v 1.76.2.1 2008/11/19 00:37:35 nijtmans Exp $ + * RCS: @(#) $Id: tkImgPhoto.c,v 1.76.2.2 2009/01/14 22:59:02 nijtmans Exp $ */ #include "tkInt.h" @@ -478,6 +478,7 @@ PhotoFormatThreadExitProc( while (tsdPtr->formatList != NULL) { freePtr = tsdPtr->formatList; tsdPtr->formatList = tsdPtr->formatList->nextPtr; + ckfree((char *) freePtr->name); ckfree((char *) freePtr); } } @@ -543,6 +544,10 @@ Tk_CreatePhotoImageFormat( copyPtr->nextPtr = tsdPtr->oldFormatList; tsdPtr->oldFormatList = copyPtr; } else { + /* for compatibility with aMSN: make a copy of formatPtr->name */ + char *name = ckalloc(strlen(formatPtr->name) + 1); + strcpy(name, formatPtr->name); + copyPtr->name = name; copyPtr->nextPtr = tsdPtr->formatList; tsdPtr->formatList = copyPtr; } |