Commit 8f5a5647 authored by Ander Conselvan de Oliveira's avatar Ander Conselvan de Oliveira Committed by Ulrich Sibiller

xcms/LRGB: Fix potential resource leak.

property_return was not free'd if the allocation of pRedTbl failed. Reviewed-by: 's avatarErkki Seppälä <erkki.seppala@vincit.fi> Signed-off-by: 's avatarAnder Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Signed-off-by: 's avatarAlan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: 's avatarUlrich Sibiller <uli42@gmx.de>
parent afd1d4eb
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment