Fixed an invalid read/write caused by deleted temporary
authorErich Keane <erich.keane@intel.com>
Fri, 10 Jul 2015 22:42:07 +0000 (15:42 -0700)
committerErich Keane <erich.keane@intel.com>
Fri, 10 Jul 2015 23:56:25 +0000 (23:56 +0000)
commitd3f0fa862b20b0607ecea93cff21ac55581c27d3
tree2f549ee66c4dbe9185bc6e2aaf817739c9b7d220
parentc7a3130ae7ec34ccde004c1bead5f0a1bb9cbb26
Fixed an invalid read/write caused by deleted temporary

The copy used a std::copy mechanism on optionData, which
resulted in the temporary being deleted before the function
returned.  This creates a variable to hold the temporary so that
the string won't be deleted before use.

Change-Id: I5da2601b730e27d42e244b52ba6cdd69a0e28fb4
Signed-off-by: Erich Keane <erich.keane@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1622
Reviewed-by: Mandeep Shetty <mandeep.shetty@intel.com>
Reviewed-by: Omkar Hegde <omkar.m.hegde@intel.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
resource/src/InProcServerWrapper.cpp