webrtcbin: Avoid access of freed memory 45/274045/2
authorSangchul Lee <sc11.lee@samsung.com>
Wed, 20 Apr 2022 08:48:01 +0000 (17:48 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Wed, 20 Apr 2022 08:59:42 +0000 (17:59 +0900)
[Version] 1.20.0-17
[Issue Type] Coverity defects fix

Change-Id: Ib6a92a06db1af09f33d879a196739d6b65f09885
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/gstreamer.spec
subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c

index 6c0120d0c56be14b59b335c24732f4018a28f4f9..ede827cd87aca60dcb4498eaeaccff320f0b7f11 100644 (file)
@@ -60,7 +60,7 @@
 
 Name:           %{_name}
 Version:        1.20.0
-Release:        16
+Release:        17
 Summary:        Streaming-Media Framework Runtime
 License:        LGPL-2.0+
 Group:          Multimedia/Framework
index 069ea3c1082571c500b22edee02ca15deb1f31eb..d30b359baa76aafb6526b10fcd09f1e4fbea3f69 100644 (file)
@@ -1879,7 +1879,9 @@ _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;
@@ -1933,6 +1935,10 @@ _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);
 
@@ -6799,8 +6805,15 @@ out:
   return ret;
 
 error:
+#ifndef TIZEN_FEATURE_WEBRTC_MODIFICATON
   if (ret)
     gst_object_unref (ret);
+#else
+  if (ret) {
+    gst_object_unref (ret);
+    ret = NULL;
+  }
+#endif
   goto out;
 }