xcms/LRGB: Fix potential resource leak.

property_return was not free'd if the allocation of pRedTbl failed.

Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
Ander Conselvan de Oliveira 2011-01-31 14:02:08 +02:00 committed by Alan Coopersmith
parent be3e6c205d
commit 3161dc57d4

View file

@ -687,6 +687,7 @@ LINEAR_RGB_InitSCCData(
/* Red Intensity Table */
if (!(pScreenData->pRedTbl = (IntensityTbl *)
Xcalloc (1, sizeof(IntensityTbl)))) {
XFree ((char * ) property_return);
goto FreeSCCData;
}
if (_XcmsGetTableType0(pScreenData->pRedTbl, format_return, &pChar,
@ -724,6 +725,7 @@ LINEAR_RGB_InitSCCData(
/* Red Intensity Table */
if (!(pScreenData->pRedTbl = (IntensityTbl *)
Xcalloc (1, sizeof(IntensityTbl)))) {
XFree ((char * ) property_return);
goto FreeSCCData;
}
if (_XcmsGetTableType1(pScreenData->pRedTbl, format_return, &pChar,