resource-directory: Fix condition on uninitialised value
resource-directory: Fix condition on uninitialised value

Issue was observed using valgrind on GNU/Linux:

https://build.iotivity.org/ci/job/iotivity-verify-unit_tests/16067/valgrindResult/pid=13739,0x2/

Bug: https://jira.iotivity.org/browse/IOT-2279
Change-Id: Ide0a2cca989466fefd4a13b41cc81bf38fa8afff
Signed-off-by: Philippe Coval <ff46fec9739d31cce915aabcc3a7a2c00eee4d6c@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20829
Reviewed-by: Habib Virji <40be98b50fb6c4d79bd282a617e2cc82e300d47f@samsung.com>

iotivity/iotivity,iotivity/iotivity,rzr/iotivity,rzr/iotivity,rzr/iotivity,rzr/iotivity,rzr/iotivity,iotivity/iotivity,iotivity/iotivity,iotivity/iotivity,iotivity/iotivity,iotivity/iotivity,rzr/iotivity,iotivity/iotivity,rzr/iotivity