This fixes IOT - 431.
Check if function pointer to context deleter is valid before calling function.
Change-Id: Ie66a79b14153b3cd09b6fb478307bc5f3d17afcd
Signed-off-by: Mandeep Shetty: <mandeep.shetty@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/609
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
// Ensure that the handle the SDK hands back up to the application layer for the
// OCDoResource call matches the found ClientCB Node.
*clientCB = cbNode;
- cbData->cd(cbData->context);
+
+ if (cbData->cd)
+ {
+ cbData->cd(cbData->context);
+ }
+
OCFree(*token);
OCFree(*handle);
OCFree(requestUri);