diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/error.c | 6 |
2 files changed, 12 insertions, 0 deletions
@@ -1,3 +1,9 @@ +2006-04-10 Alan Coopersmith <alan.coopersmith@sun.com> + + * src/error.c: + Coverity #664: Free memory allocated by EXTRACT_STRING in + _IceDefaultErrorHandler after we're done fprintf()'ing it. + 2005-12-14 Kevin E. Martin <kem-at-freedesktop-dot-org> * configure.ac: diff --git a/src/error.c b/src/error.c index 49b164b..8021ad4 100644 --- a/src/error.c +++ b/src/error.c @@ -1,3 +1,4 @@ +/* $XdotOrg: $ */ /* $Xorg: error.c,v 1.4 2001/02/09 02:03:26 xorgcvs Exp $ */ /****************************************************************************** @@ -531,24 +532,28 @@ IcePointer values; EXTRACT_STRING (pData, swap, str); fprintf (stderr, "Reason : %s\n", str); + free(str); break; case IceAuthRejected: EXTRACT_STRING (pData, swap, str); fprintf (stderr, "Reason : %s\n", str); + free(str); break; case IceAuthFailed: EXTRACT_STRING (pData, swap, str); fprintf (stderr, "Reason : %s\n", str); + free(str); break; case IceProtocolDuplicate: EXTRACT_STRING (pData, swap, str); fprintf (stderr, "Protocol name : %s\n", str); + free(str); break; case IceMajorOpcodeDuplicate: @@ -560,6 +565,7 @@ IcePointer values; EXTRACT_STRING (pData, swap, str); fprintf (stderr, "Protocol name : %s\n", str); + free(str); break; default: |