webrtcbin: Avoid access of freed memory 62/281362/1 accepted/tizen/unified/20220920.160548
authorSangchul Lee <sc11.lee@samsung.com>
Wed, 20 Apr 2022 15:38:37 +0000 (00:38 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Fri, 16 Sep 2022 04:51:06 +0000 (13:51 +0900)
Change-Id: I3489f2f718bdcd298ffc90c62a7352544293a70c
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2256>

subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c

index 6013788..45bce86 100644 (file)
@@ -1874,9 +1874,6 @@ _find_codec_preferences (GstWebRTCBin * webrtc,
 
       caps = _query_pad_caps (webrtc, rtp_trans, pad, filter, error);
     }
-#ifndef TIZEN_FEATURE_WEBRTC_MODIFICATION
-    gst_object_unref (pad);
-#endif
 
     if (*error)
       goto out;
@@ -1932,10 +1929,8 @@ _find_codec_preferences (GstWebRTCBin * webrtc,
 
 out:
 
-#ifdef TIZEN_FEATURE_WEBRTC_MODIFICATION
   if (pad)
     gst_object_unref (pad);
-#endif
   if (codec_preferences)
     gst_caps_unref (codec_preferences);