Commit eb124e409b for freeswitch.com
commit eb124e409bf38ef461fc951b22d5e848479b8289
Author: Andrey Volk <andywolk@gmail.com>
Date: Wed Jan 12 20:07:20 2022 +0300
[libvpx] scan-build: avoid dereference of null pointer
diff --git a/libs/libvpx/vp9/common/vp9_onyxc_int.h b/libs/libvpx/vp9/common/vp9_onyxc_int.h
index 1cfc12f6fa..fb2ae018eb 100644
--- a/libs/libvpx/vp9/common/vp9_onyxc_int.h
+++ b/libs/libvpx/vp9/common/vp9_onyxc_int.h
@@ -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--;