aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nx-X11/lib/X11/LRGB.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/nx-X11/lib/X11/LRGB.c b/nx-X11/lib/X11/LRGB.c
index 534a7307e..f2027ea3f 100644
--- a/nx-X11/lib/X11/LRGB.c
+++ b/nx-X11/lib/X11/LRGB.c
@@ -595,8 +595,7 @@ LINEAR_RGB_InitSCCData(
* intensity2
*/
if (nitems < 9) {
- Xfree ((char *)property_return);
- goto FreeSCCData;
+ goto Free_property_return;
}
count = 3;
break;
@@ -612,8 +611,7 @@ LINEAR_RGB_InitSCCData(
* intensity2
*/
if (nitems < 7) {
- Xfree ((char *)property_return);
- goto FreeSCCData;
+ goto Free_property_return;
}
count = 1;
break;
@@ -628,14 +626,12 @@ LINEAR_RGB_InitSCCData(
* intensity2
*/
if (nitems < 6) {
- Xfree ((char *)property_return);
- goto FreeSCCData;
+ goto Free_property_return;
}
count = 0;
break;
default:
- Xfree ((char *)property_return);
- goto FreeSCCData;
+ goto Free_property_return;
}
/*
@@ -687,8 +683,7 @@ LINEAR_RGB_InitSCCData(
/* Red Intensity Table */
if (!(pScreenData->pRedTbl = (IntensityTbl *)
Xcalloc (1, sizeof(IntensityTbl)))) {
- XFree ((char * ) property_return);
- goto FreeSCCData;
+ goto Free_property_return;
}
if (_XcmsGetTableType0(pScreenData->pRedTbl, format_return, &pChar,
&nitems) == XcmsFailure) {
@@ -725,8 +720,7 @@ LINEAR_RGB_InitSCCData(
/* Red Intensity Table */
if (!(pScreenData->pRedTbl = (IntensityTbl *)
Xcalloc (1, sizeof(IntensityTbl)))) {
- XFree ((char * ) property_return);
- goto FreeSCCData;
+ goto Free_property_return;
}
if (_XcmsGetTableType1(pScreenData->pRedTbl, format_return, &pChar,
&nitems) == XcmsFailure) {
@@ -763,8 +757,7 @@ LINEAR_RGB_InitSCCData(
}
}
} else {
- Xfree ((char *)property_return);
- goto FreeSCCData;
+ goto Free_property_return;
}
#ifdef ALLDEBUG
@@ -821,6 +814,9 @@ FreeRedTblElements:
FreeRedTbl:
Xfree((char *)pScreenData->pRedTbl);
+Free_property_return:
+ Xfree ((char *)property_return);
+
FreeSCCData:
Xfree((char *)pScreenData);
pPerScrnInfo->state = XcmsInitNone;