From: Rafal Walczyna Date: Wed, 28 Mar 2018 11:24:48 +0000 (+0200) Subject: [datacontrol] Fixing coverity issues X-Git-Tag: accepted/tizen/4.0/unified/20180404.063501^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d2bc14c3b4f3f09bb64e28301baad2a8d724ef0f;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [datacontrol] Fixing coverity issues [Feature] Fixed coverity ids: 109463, 108734 [Verification] 100% passrate on TCT datacontrol tests Change-Id: I5e563fbd58c814d8d7ca1eefde465303f263c2f3 Signed-off-by: Rafal Walczyna --- diff --git a/src/datacontrol/datacontrol_instance.cc b/src/datacontrol/datacontrol_instance.cc index cb1b657..4f1eb75 100644 --- a/src/datacontrol/datacontrol_instance.cc +++ b/src/datacontrol/datacontrol_instance.cc @@ -994,6 +994,10 @@ void DatacontrolInstance::callback(data_control_h provider, data_control_data_ch char* provider_id = nullptr; char* data_id = nullptr; + SCOPE_EXIT { + free(provider_id); + free(data_id); + }; int result = DATA_CONTROL_ERROR_NONE; if (DATA_CONTROL_DATA_CHANGE_SQL_UPDATE == type || DATA_CONTROL_DATA_CHANGE_SQL_INSERT == type ||