Unlock locker when error occurs during webrtc_create() 11/318711/1 accepted/tizen_7.0_unified tizen_7.0 accepted/tizen/7.0/unified/20241008.173911
authorSangchul Lee <sc11.lee@samsung.com>
Mon, 7 Oct 2024 06:25:56 +0000 (15:25 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Mon, 7 Oct 2024 08:33:03 +0000 (17:33 +0900)
[Version] 0.3.309
[Issue Type] ASAN defect

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

index 4045a821ec4d9c272bbddd8b548af382902af770..7ffcd3b45a4c52f0bbb94ec78cce9c37693699e0 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-webrtc
 Summary:    A WebRTC library in Tizen Native API
-Version:    0.3.308
+Version:    0.3.309
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index ad309b60c6496fad0bf2fa364d983b4fbf2feb18..991deb4be4a29f1d30250898e275213b8b343eb1 100644 (file)
@@ -138,6 +138,14 @@ int webrtc_create(webrtc_h *webrtc)
 
 error:
        _unload_ini(_webrtc);
+       g_clear_pointer(&locker, g_mutex_locker_free);
+       g_mutex_clear(&_webrtc->mutex);
+       g_mutex_clear(&_webrtc->event_src_mutex);
+       g_mutex_clear(&_webrtc->desc_mutex);
+       g_cond_clear(&_webrtc->desc_cond);
+       g_mutex_clear(&_webrtc->stats_mutex);
+       g_cond_clear(&_webrtc->stats_cond);
+       g_mutex_clear(&_webrtc->destroy_mutex);
        g_free(_webrtc);
 
        return ret;