summaryrefslogtreecommitdiffstats
path: root/generic/tkImgPhoto.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2009-01-14 22:59:02 (GMT)
committernijtmans <nijtmans>2009-01-14 22:59:02 (GMT)
commitb34ad495397404db5aaf1ce8aa8355542304d5fd (patch)
tree23ebdf256f7a1023dfaff311d977db5c3e9153d7 /generic/tkImgPhoto.c
parent5e6717df983f423fbf7da7d49d240ea7785a8ddf (diff)
downloadtk-b34ad495397404db5aaf1ce8aa8355542304d5fd.zip
tk-b34ad495397404db5aaf1ce8aa8355542304d5fd.tar.gz
tk-b34ad495397404db5aaf1ce8aa8355542304d5fd.tar.bz2
fix for aMSN compatibility [tcl-Bug 2507326]
Diffstat (limited to 'generic/tkImgPhoto.c')
-rw-r--r--generic/tkImgPhoto.c7
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;
}