From: Andrzej Popowski Date: Mon, 8 Jun 2015 12:13:26 +0000 (+0200) Subject: [Datacontol] - fixing a bug in the function SQLColumnValue X-Git-Tag: submit/tizen_mobile/20150612.133019^2~2^2~33^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=66b7e8478bed3364dc3f39376526dc75924164f0;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [Datacontol] - fixing a bug in the function SQLColumnValue Change-Id: Id95e21b44eac8a5f4c9edf4e4bce184158ebd3c7 Signed-off-by: Andrzej Popowski --- diff --git a/src/datacontrol/datacontrol_instance.cc b/src/datacontrol/datacontrol_instance.cc index 27dd2b96..c0df1cca 100755 --- a/src/datacontrol/datacontrol_instance.cc +++ b/src/datacontrol/datacontrol_instance.cc @@ -151,7 +151,10 @@ static bool SQLColumnValue(result_set_cursor cursor, int columnIndex, char *buffer = new char[size + 1]; result = data_control_sql_get_blob_data(cursor, columnIndex, buffer, size); - if (result != DATA_CONTROL_ERROR_NONE) break; + if (result != DATA_CONTROL_ERROR_NONE) { + delete[] buffer; + break; + } val = picojson::value(buffer); delete[] buffer; break;