resource-directory: Check links before free 27/22127/5
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Thu, 24 Aug 2017 14:23:51 +0000 (16:23 +0200)
committerMats Wichmann <mats@linux.com>
Wed, 27 Sep 2017 20:04:58 +0000 (20:04 +0000)
commit49c5c01e613d4aeaf6f03351ea69a31f86e72ecd
tree258901b30e236c6537b74cfabdf93c9fa459f46c
parent3c34fc2756da9c63022a8437d9bb13e5c078f2b4
resource-directory: Check links before free

In case if pointer has not been assigned

This is also suppressing a valgrind warning
when running test resource/csdk/stack/test/stacktests:

  2,208 bytes in 1 blocks \
  are possibly lost in loss record 0 if 0

Bug: https://jira.iotivity.org/browse/IOT-2645
Change-Id: Ifd44172a1f7755ec253748f6f02fbfd1dcacdd39
Origin: https://gerrit.iotivity.org/gerrit/#/c/22107/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/22107
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
(cherry picked from commit 2c926be5e04dd982316c05c461c9a95fd0beae9a)
resource/csdk/resource-directory/src/rd_client.c