From 4da236e750fa29c8afdb2c8c2fc537efd7187fc5 Mon Sep 17 00:00:00 2001 From: Habib Virji Date: Mon, 26 Sep 2016 23:26:15 +0100 Subject: [PATCH] InProcServerWrapper null pointer dereference clientResponse is redundant or null pointer dereference https://jira.iotivity.org/browse/IOT-1311 Change-Id: Id1f0d7088443bc875c6a99a20a4e30cdcbc4b4a0 Signed-off-by: Habib Virji Reviewed-on: https://gerrit.iotivity.org/gerrit/12235 Tested-by: jenkins-iotivity Reviewed-by: Phil Coval Reviewed-by: Ziran Sun --- resource/src/InProcServerWrapper.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/resource/src/InProcServerWrapper.cpp b/resource/src/InProcServerWrapper.cpp index 3d0ad0a..af1e51d 100644 --- a/resource/src/InProcServerWrapper.cpp +++ b/resource/src/InProcServerWrapper.cpp @@ -654,11 +654,10 @@ namespace OC } } + OCRepresentation rep = parseRDResponseCallback(clientResponse); + std::thread exec(context->callback, rep, clientResponse->result); + exec.detach(); } - - OCRepresentation rep = parseRDResponseCallback(clientResponse); - std::thread exec(context->callback, rep, clientResponse->result); - exec.detach(); } catch (OC::OCException& e) { -- 2.7.4