webrtc_test: Fix coverity issue of USE_AFTER_FREE 27/264727/1 accepted/tizen/6.5/unified/20211028.095559 accepted/tizen/unified/20211001.001401 submit/tizen/20210929.042039 submit/tizen_6.5/20211028.161801 tizen_6.5.m2_release
authorSangchul Lee <sc11.lee@samsung.com>
Wed, 29 Sep 2021 03:08:30 +0000 (12:08 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Wed, 29 Sep 2021 03:08:30 +0000 (12:08 +0900)
[Version] 0.2.108
[Issue Type] Coverity (USE_AFTER_FREE)

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

index 6d2a8258c0743d70f9a7569663db4bfa92ea0d11..8c92f7f59e1cedbb9b4aef93d99b7a254d1c04c2 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-webrtc
 Summary:    A WebRTC library in Tizen Native API
-Version:    0.2.107
+Version:    0.2.108
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 98958a20d3e03cbd002e6adb547c1d0a9e54ab6f..9a301b7dc4d848a0e77e4b06be988a0e42bc6e6a 100644 (file)
@@ -3192,13 +3192,13 @@ static void __close_websocket(connection_s *conn)
 {
        RET_IF(!conn, "conn is NULL");
 
+       g_print("close websocket, ws_conn[%p]\n", conn->ws_conn);
+
        if (soup_websocket_connection_get_state(conn->ws_conn) == SOUP_WEBSOCKET_STATE_OPEN)
                soup_websocket_connection_close(conn->ws_conn, 1000, "");
        else
                g_object_unref(conn->ws_conn);
 
-       g_print("conn[%p] is closed\n",conn->ws_conn);
-
        conn->ws_conn = NULL;
        conn->server_status = SERVER_STATUS_DISCONNECTED;
 }