mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-07 15:38:05 +02:00
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:
parent
be3e6c205d
commit
3161dc57d4
1 changed files with 2 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue