Fix use-after-free.
Fix use-after-free.

Change-Id: If1b8b9a9be0697704507a5df77020df37b7ab0ec
Signed-off-by: Todd Malsbary <8856a5d8416dae6d0ae52d024d7a973f628fb21e@intel.com>

iotivity/iotivity-alljoyn-bridge,iotivity/iotivity-alljoyn-bridge,iotivity/iotivity-alljoyn-bridge