[Release version 0.2.56] Fix memory leak - imported TBM bo(buffer object) 22/68922/1 accepted/tizen/common/20160513.123220 accepted/tizen/ivi/20160513.004144 accepted/tizen/mobile/20160513.004022 accepted/tizen/tv/20160513.004122 accepted/tizen/wearable/20160513.004049 submit/tizen/20160512.051443
authorJeongmo Yang <jm80.yang@samsung.com>
Tue, 10 May 2016 10:57:47 +0000 (19:57 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Tue, 10 May 2016 10:57:47 +0000 (19:57 +0900)
Change-Id: Ia46f8fabf62b7086454e8fdccc7ca5d5f589e386
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/capi-media-camera.spec
src/camera.c

index 7278f67..06aee50 100644 (file)
@@ -3,7 +3,7 @@
 
 Name:       capi-media-camera
 Summary:    A Camera API
-Version:    0.2.55
+Version:    0.2.56
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index ed7b9b8..da4ea12 100644 (file)
@@ -937,6 +937,7 @@ static void _client_user_callback(camera_cb_info_s *cb_info, char *recv_msg, mus
                        /* import tbm bo and get virtual address */
                        if (!_import_tbm_key(cb_info->bufmgr, tbm_key, &bo, &bo_handle)) {
                                LOGE("failed to import key %d", tbm_key);
+                               _release_imported_bo(&data_bo);
                                muse_camera_msg_send1_no_return(MUSE_CAMERA_API_RETURN_BUFFER,
                                        cb_info->fd, cb_info, INT, tbm_key);
                                break;
@@ -1029,6 +1030,7 @@ static void _client_user_callback(camera_cb_info_s *cb_info, char *recv_msg, mus
                                        _release_imported_bo(&buffer_bo[i]);
 
                                /* unmap and unref tbm bo */
+                               _release_imported_bo(&data_bo);
                                _release_imported_bo(&bo);
 
                                /* return buffer */