On 01/31/11 04:02 AM, Erkki Seppälä wrote:
> From: Ander Conselvan de Oliveira <[email protected]>
> 
> xcms/LRGB: Fix potential resource leak.
> 
> 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,

Reviewed-by: Alan Coopersmith <[email protected]>

-- 
        -Alan Coopersmith-        [email protected]
         Oracle Solaris Platform Engineering: X Window System

_______________________________________________
[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