media_editor_display : Fix resource leak 13/274213/2 accepted/tizen/unified/20220425.133142 submit/tizen/20220425.073511
authorHaesu Gwon <haesu.gwon@samsung.com>
Mon, 25 Apr 2022 02:00:04 +0000 (11:00 +0900)
committerHaesu Gwon <haesu.gwon@samsung.com>
Mon, 25 Apr 2022 02:34:23 +0000 (11:34 +0900)
[Version] 0.0.4
[Issue Type] COVERITY defect fix

Change-Id: I9e73751f897ddda4150905ddf3cd19741c954937

packaging/capi-media-editor.spec
src/media_editor_display.c

index 0f39b95..fd73bdc 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-editor
 Summary:    A Tizen Media Editor API
-Version:    0.0.3
+Version:    0.0.4
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 2fbee39..b0ad64b 100644 (file)
@@ -96,6 +96,8 @@ static int __init_display(mediaeditor_display_s **display)
 
     if ((ret = mm_display_interface_init(&_display->mm_display)) != MM_ERROR_NONE) {
         LOG_ERROR("failed to init display. (0x%x)", ret);
+        g_mutex_clear(&_display->mutex);
+        g_free(_display);
         return MEDIAEDITOR_ERROR_INVALID_OPERATION;
     }