]> 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>
Fri, 10 Jul 2026 16:38:46 +0000 (19:38 +0300)
libs/libvpx/vp9/common/vp9_onyxc_int.h

index 1cfc12f6fa1153ee2129c181125c3bed8a792251..fb2ae018ebf47c9e80a43a5a899182b6c9b14ed8 100644 (file)
@@ -349,6 +349,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--;