Fixed chance of crash when sending notification to client 79/57279/2
authorNishant Chaprana <n.chaprana@samsung.com>
Mon, 18 Jan 2016 14:12:18 +0000 (19:42 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Fri, 12 Feb 2016 05:30:02 +0000 (11:00 +0530)
commit7b28adf7cf1abf6789c812297870831948378170
treeac5f22bb44c92f114a9cd9e3db5246d18eb90479
parentdb4eff7a141f0ee56fd1dbf75d4fbcdd82bef3f6
Fixed chance of crash when sending notification to client

Description: notification variable should be local variable,
instead of a pointer because when it is taken as a pointer and
g_try_malloc0() fails to allocate memory, in that case crash
will occur by dereferencing "noti" pointer.
Also if we add a null check for noti allocation failure, then
we would fail to send notification to application, which is not
correct operation.
So noti should a local variable instead of pointer.

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