webrtc_sink: Fix memory leak 88/279788/2 accepted/tizen/unified/20220819.122422 submit/tizen/20220819.010835
authorSangchul Lee <sc11.lee@samsung.com>
Thu, 18 Aug 2022 01:10:11 +0000 (10:10 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Thu, 18 Aug 2022 01:29:45 +0000 (10:29 +0900)
[Version] 0.3.203
[Issue Type] Coverity defect (Resource leak)

Change-Id: I48e8d4a660ce618ac1b620f0b2e661a19c5398aa
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/capi-media-webrtc.spec
src/webrtc_sink.c

index cf76a5661a700b869b1c4fb4e3e1e78ddce87152..94ba7e7bfb981512be210f0618eee4291d3b411b 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-webrtc
 Summary:    A WebRTC library in Tizen Native API
-Version:    0.3.202
+Version:    0.3.203
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 7c525ac295d4785f92bb82bce8cbf21a40964372..bdad118efe429bef16578e0015e4228d787acb72 100644 (file)
@@ -159,8 +159,10 @@ static int __build_videosink(webrtc_s *webrtc, GstElement *decodebin, GstPad *sr
 #ifndef TIZEN_TV
                if (sink->display->type == WEBRTC_DISPLAY_TYPE_OVERLAY && webrtc->ini.resource_acquisition.video_overlay) {
                        int ret = _acquire_resource_for_type(webrtc, MM_RESOURCE_MANAGER_RES_TYPE_VIDEO_OVERLAY);
-                       if (ret != WEBRTC_ERROR_NONE)
+                       if (ret != WEBRTC_ERROR_NONE) {
+                               SAFE_G_LIST_FREE_FULL(element_list, gst_object_unref);
                                return ret;
+                       }
                }
 #endif
                if (sink->display->type == WEBRTC_DISPLAY_TYPE_OVERLAY ||