From: Ander Conselvan de Oliveira <[email protected]>

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

Reviewed-by: Erkki Seppälä <[email protected]>
Signed-off-by: Ander Conselvan de Oliveira 
<[email protected]>
Signed-off-by: Erkki Seppälä <[email protected]>
---
 src/xcms/LRGB.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/xcms/LRGB.c b/src/xcms/LRGB.c
index d9168bd..c1606be 100644
--- a/src/xcms/LRGB.c
+++ b/src/xcms/LRGB.c
@@ -686,6 +686,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,
@@ -723,6 +724,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,
-- 
1.7.0.4

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to