diff options
author | Alan Coopersmith <Alan.Coopersmith@sun.com> | 2006-04-10 16:44:40 +0000 |
---|---|---|
committer | Alan Coopersmith <Alan.Coopersmith@sun.com> | 2006-04-10 16:44:40 +0000 |
commit | 96d7763487da6624ed85bee10b081e7138d2060d (patch) | |
tree | bad5cb98e037912d44666f2fc58abdcee976977f | |
parent | 2a30ec82f3bd2aa1f2566e97fee70403a8448de8 (diff) |
Coverity #664: Free memory allocated by EXTRACT_STRING in
_IceDefaultErrorHandler after we're done fprintf()'ing it.
-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: |