Fix memory free logic 54/139854/1 accepted/tizen_4.0_unified tizen_4.0 accepted/tizen/4.0/unified/20170816.012942 accepted/tizen/4.0/unified/20170816.015625 accepted/tizen/4.0/unified/20170829.020527 accepted/tizen/unified/20170721.202150 submit/tizen/20170721.023559 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170814.115522 submit/tizen_4.0/20170828.100004 submit/tizen_4.0_unified/20170814.115522 tizen_4.0.IoT.p1_release tizen_4.0.IoT.p2_release tizen_4.0.m2_release
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 21 Jul 2017 00:53:53 +0000 (09:53 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Fri, 21 Jul 2017 00:53:55 +0000 (09:53 +0900)
The memory was allocated using 'new T[]' operator but was released using the 'delete' operator.

Change-Id: I5974c85cc0c129e7b5c222527ade456a382b0d80
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/scim_generic_table.cpp

index cf3c131da3cb71d495bcbfdd20ef25c901a94101..33ab03377ed13169db9ccb409e93e1616f26a39f 100755 (executable)
@@ -995,7 +995,7 @@ GenericTableContent::set_max_key_length (size_t max_key_length)
 
         offsets_attrs = new(std::nothrow) std::vector <OffsetGroupAttr> [max_key_length];
         if (!offsets_attrs) {
-            delete offsets;
+            delete [] offsets;
             return;
         }