[FFmpeg-devel] [PATCH 10/17] avdevice/dshow: Remove NULL check on pin

Michael Niedermayer michael at niedermayer.cc
Mon May 27 02:52:22 EEST 2024


The pointer is used before the check

Fixes: CID1591884 Dereference before null check

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavdevice/dshow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index 0330d1d0b6c..8942c0c499a 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -432,8 +432,8 @@ dshow_get_device_media_types(AVFormatContext *avctx, enum dshowDeviceType devtyp
             IEnumMediaTypes_Release(types);
         if (p)
             IKsPropertySet_Release(p);
-        if (pin)
-            IPin_Release(pin);
+
+        IPin_Release(pin);
     }
 
     IEnumPins_Release(pins);
-- 
2.45.1



More information about the ffmpeg-devel mailing list