From 927d276fcc5798ccb07cd9c3d4e540d49f3a4cfd Mon Sep 17 00:00:00 2001 From: Tae-Young Chung Date: Wed, 22 Jun 2016 16:45:02 +0900 Subject: [PATCH] [Fixed bug] Fixed HEAP incompatible delete/free() usage Change-Id: Ibb97fb9fc131f0dd84084aafbdb0d47032cfcc97 Signed-off-by: Tae-Young Chung --- .../surveillance/src/EventTriggerPersonRecognition.cpp | 12 ++++++++---- packaging/capi-media-vision.spec | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/mv_surveillance/surveillance/src/EventTriggerPersonRecognition.cpp b/mv_surveillance/surveillance/src/EventTriggerPersonRecognition.cpp index f99c78a..7fff094 100644 --- a/mv_surveillance/surveillance/src/EventTriggerPersonRecognition.cpp +++ b/mv_surveillance/surveillance/src/EventTriggerPersonRecognition.cpp @@ -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; } diff --git a/packaging/capi-media-vision.spec b/packaging/capi-media-vision.spec index d66161e..c0ce93a 100644 --- a/packaging/capi-media-vision.spec +++ b/packaging/capi-media-vision.spec @@ -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 -- 2.7.4