summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlan Coopersmith <Alan.Coopersmith@sun.com>2006-04-10 16:44:40 +0000
committerAlan Coopersmith <Alan.Coopersmith@sun.com>2006-04-10 16:44:40 +0000
commit96d7763487da6624ed85bee10b081e7138d2060d (patch)
treebad5cb98e037912d44666f2fc58abdcee976977f /src
parent2a30ec82f3bd2aa1f2566e97fee70403a8448de8 (diff)
Coverity #664: Free memory allocated by EXTRACT_STRING in
_IceDefaultErrorHandler after we're done fprintf()'ing it.
Diffstat (limited to 'src')
-rw-r--r--src/error.c6
1 files changed, 6 insertions, 0 deletions
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: