in

On Sat, Sep 8, 2012 at 10:28 PM, Basil Gor <basil....@gmail.com> wrote:

> Hi,
>
> GET_NUM macro contained two statements, and caused double stringshare free
> when used in "if" statement without brackets and condition evaluated as
> false.
>
> e/src/modules/battery/e_mod_udev.c:
> 222         if (!bat->design_charge) <-- here
> 223           GET_NUM(bat, design_charge, POWER_SUPPLY_CHARGE_FULL_DESIGN);
> 224      }
> 225    GET_NUM(bat, last_full_charge, POWER_SUPPLY_ENERGY_FULL);
> 226    if (!bat->last_full_charge)   <-- here
> 227      GET_NUM(bat, last_full_charge, POWER_SUPPLY_CHARGE_FULL);
>
> Second part of the macro executed unconditionally and called
> eina_stringshare_del for the old value of variable "test".
>
> Please see the patch attached.
>
> --
> Regards
> Basil Gor
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to