Hi,

My colleague found something wired in IotivityandZigbeeServer.c.
(plugins/samples/linux/IotivityandZigbeeServer.c)

A pointer is freed but it will be used.

It is in function SetDeviceInfo(), as the red lines below.




OCStackResult SetDeviceInfo()


{


    static OCDeviceInfo deviceInfo =


        {


            .deviceName = "IoTivity/Zigbee Server Sample",


        };


    char *dup = OICStrdup("oic.wk.d");


    deviceInfo.types = (OCStringLL *)OICCalloc(1, sizeof(OCStringLL));


    deviceInfo.types->value = dup;


    OICFree(dup);


    return OCSetDeviceInfo(deviceInfo);


}



Could someone help to check it?



Thank you & Best Regards,

Annie

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160503/ffd27c37/attachment.html>

Reply via email to