Newly created group's memory should be allocated using g_try_malloc0 70/59370/1
authorNishant Chaprana <n.chaprana@samsung.com>
Mon, 15 Feb 2016 06:26:19 +0000 (11:56 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Mon, 15 Feb 2016 06:26:19 +0000 (11:56 +0530)
commit699c486cc44d406afbed979f051d63f08dbc32bd
treed4105860753c40a21b48d8eabfc000916b5e204c
parent42106fcc69e7cd9efdc724781e76f1dfba37355f
Newly created group's memory should be allocated using g_try_malloc0

This patch allocates newly created group's memory using g_try_malloc0
because the memory for group is freed using g_free() in wfd_destroy_group().
If the allocator and destructor funciton of memory are different
then chances of memory corruption are present because glib maintains its own
memory allocation pool.

Change-Id: I995376f9d1349df06ca3866ac7caab4b25f88bba
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
packaging/wifi-direct-manager.spec
src/wifi-direct-group.c