summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>2011-01-31 14:02:08 +0200
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-02-01 23:46:20 -0800
commit3161dc57d4e9b70f852f05e5e474455e121b06ab (patch)
tree06d3205878452095f01f45e2067322e5e096906a
parentbe3e6c205d94dedc1cdebf5d17b987f0f828377a (diff)
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>
-rw-r--r--src/xcms/LRGB.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xcms/LRGB.c b/src/xcms/LRGB.c
index 2f7a4ccf..77fac367 100644
--- a/src/xcms/LRGB.c
+++ b/src/xcms/LRGB.c
@@ -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,