Decrement the g_wdnfree variable only if there is a valid wdog node in g_wdfreelist
authorpradeep.ns <pradeep.ns@samsung.com>
Thu, 11 May 2017 14:35:21 +0000 (20:05 +0530)
committerpradeep.ns <pradeep.ns@samsung.com>
Thu, 11 May 2017 14:35:21 +0000 (20:05 +0530)
commit88929cbfb358aa93249d656a4a3e2e01972998c7
tree2de74fd6412da15e15e156f6687dc39507988c6f
parentddb1977e99a8d172c5a435856d75afb34df8ffb0
Decrement the g_wdnfree variable only if there is a valid wdog node in g_wdfreelist

If the g_wdfreelist doesn't contain any node, it will return NULL and
decrementing the g_wdnfree variable would lead to wrong logic.
Decrement the g_wdnfree variable only if there is a valid wdog is returned from g_wdfreelist

Signed-off-by: pradeep.ns <pradeep.ns@samsung.com>
os/kernel/wdog/wd_create.c