]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[libvpx] scan-build: avoid dereference of null pointer
authorAndrey Volk <andywolk@gmail.com>
Wed, 12 Jan 2022 17:07:20 +0000 (20:07 +0300)
committerAndrey Volk <andywolk@gmail.com>
Tue, 9 Aug 2022 20:26:13 +0000 (23:26 +0300)
libs/libvpx/vp9/common/vp9_onyxc_int.h

index 662b8ef5e12f33bc46cdecde5164492641d1e48b..c5b98c00214c1a9cbe63b5b69b7fc4f7bff5adaa 100644 (file)
@@ -299,6 +299,8 @@ static INLINE int get_free_fb(VP9_COMMON *cm) {
 static INLINE void ref_cnt_fb(RefCntBuffer *bufs, int *idx, int new_idx) {
   const int ref_index = *idx;
 
+  if (!bufs) return;
+
   if (ref_index >= 0 && bufs[ref_index].ref_count > 0)
     bufs[ref_index].ref_count--;