[Fixed bug] Fixed HEAP incompatible delete/free() usage 48/75948/1 accepted/tizen/common/20160627.191456 submit/tizen/20160623.063229
authorTae-Young Chung <ty83.chung@samsung.com>
Wed, 22 Jun 2016 07:45:02 +0000 (16:45 +0900)
committerTae-Young Chung <ty83.chung@samsung.com>
Wed, 22 Jun 2016 07:45:05 +0000 (16:45 +0900)
Change-Id: Ibb97fb9fc131f0dd84084aafbdb0d47032cfcc97
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
mv_surveillance/surveillance/src/EventTriggerPersonRecognition.cpp
packaging/capi-media-vision.spec

index f99c78a..7fff094 100644 (file)
@@ -138,8 +138,10 @@ int EventTriggerPersonRecognition::parseEngineConfig(mv_engine_config_h engineCo
                        &modelPath);
 
        if (error != MEDIA_VISION_ERROR_NONE) {
-               if (modelPath != NULL)
-                       delete[] modelPath;
+               if (modelPath != NULL) {
+                       free(modelPath);
+                       modelPath = NULL;
+               }
 
                LOGE("Getting recognition model from engine configuration failed.");
 
@@ -154,8 +156,10 @@ int EventTriggerPersonRecognition::parseEngineConfig(mv_engine_config_h engineCo
                LOGE("Loading recognition model from file %s failed.",
                                modelPath);
 
-               if (modelPath != NULL)
-                       delete[] modelPath;
+               if (modelPath != NULL) {
+                       free(modelPath);
+                       modelPath = NULL;
+               }
 
                return error;
        }
index d66161e..c0ce93a 100644 (file)
@@ -1,7 +1,7 @@
 Name:        capi-media-vision
 Summary:     Media Vision library for Tizen Native API
 Version:     0.3.20
-Release:     1
+Release:     2
 Group:       Multimedia/Framework
 License:     Apache-2.0 and BSD-2.0
 Source0:     %{name}-%{version}.tar.gz