Fixed incompatibility heap free 78/55578/1
authorTae-Young Chung <ty83.chung@samsung.com>
Mon, 28 Dec 2015 01:08:17 +0000 (10:08 +0900)
committerTae-Young Chung <ty83.chung@samsung.com>
Mon, 28 Dec 2015 01:08:21 +0000 (10:08 +0900)
Change-Id: I59ae33f87e76a85769013ff7c92b200b447e0073
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
mv_face/face/src/mv_face_open.cpp
mv_surveillance/surveillance/src/EventTrigger.cpp
packaging/capi-media-vision.spec

index 0412f85..917924e 100644 (file)
@@ -726,7 +726,7 @@ int mv_face_recognition_model_query_labels_open(
 
        const std::set<int>& learnedLabels = pRecModel->getFaceLabels();
        *number_of_labels = learnedLabels.size();
-       (*labels) = new int[*number_of_labels];
+       (*labels) = (int*)malloc(sizeof(int) * (*number_of_labels));
 
        std::set<int>::const_iterator it = learnedLabels.begin();
        int i = 0;
index d6b4cec..c2fec7c 100644 (file)
@@ -144,8 +144,10 @@ int EventTrigger::applyROIToImage(
                                                &maskBuffer);
 
                if (error != MEDIA_VISION_ERROR_NONE || maskBuffer == NULL) {
-                       if (maskBuffer != NULL)
-                               delete maskBuffer;
+                       if (maskBuffer != NULL) {
+                               free(maskBuffer);
+                               maskBuffer = NULL;
+                       }
 
                        LOGE("Getting mask buffer failed.");
                        return error;
@@ -159,7 +161,8 @@ int EventTrigger::applyROIToImage(
                                        imageWidth,
                                        image);
 
-               delete maskBuffer;
+               free(maskBuffer);
+               maskBuffer = NULL;
 
                if (error != MEDIA_VISION_ERROR_NONE) {
                        LOGE("Applying mask buffer failed.");
index 32d97bc..d7261c8 100644 (file)
@@ -1,6 +1,6 @@
 Name:        capi-media-vision
 Summary:     Media Vision library for Tizen Native API
-Version:     0.3.4
+Version:     0.3.5
 Release:     0
 Group:       Multimedia/Framework
 License:     Apache-2.0 and BSD-2.0