summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--generic/tkImgPhoto.c7
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4d4886b..4f9e4f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-01-14 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * generic/tkImgPhoto.c: fix for aMSN compatibility [tcl-Bug 2507326]
+
2009-01-11 George Peter Staplin <georgeps@users.sourceforge.net>
* generic/tkEvent.c: Backport a fix from 8.6 for a NULL pointer
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;
}