Fix deadcode execution in ocserverrequest.c
authorHabib Virji <habib.virji@samsung.com>
Fri, 9 Dec 2016 18:39:35 +0000 (18:39 +0000)
committerZiran Sun <ziran.sun@samsung.com>
Tue, 13 Dec 2016 11:34:01 +0000 (11:34 +0000)
commit40fcb5ec3bb20022aec9fac94eba2e1720a3d8a0
treee51bf1f41395aa35be692a6de854f4cdd41a2aa1
parenteff5b1879523483e90d02474cd19dfd125cfe3ea
Fix deadcode execution in ocserverrequest.c

There was a deadcode.

It has goto statement which is only called when memory allocation fails.

In the goto statement, it was trying to free the variable that failed in memory allocation.

BUG: https://jira.iotivity.org/browse/IOT-1664
Change-Id: I36ea779ee5bae131a10f55dafcb45728c1e7dc9b
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15373
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
resource/csdk/stack/src/ocserverrequest.c