From f56d5d56efe9e92d8b0517603f0491856985c7cc Mon Sep 17 00:00:00 2001 From: Andrey Volk Date: Sun, 16 Feb 2020 04:06:37 +0400 Subject: [PATCH] [sofia-sip] scan-build: Fix "Called function pointer is null (null dereference)" in t_filter() of su_taglist.c --- libs/sofia-sip/libsofia-sip-ua/su/su_taglist.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/sofia-sip/libsofia-sip-ua/su/su_taglist.c b/libs/sofia-sip/libsofia-sip-ua/su/su_taglist.c index 431a2dcb56..27510a4024 100644 --- a/libs/sofia-sip/libsofia-sip-ua/su/su_taglist.c +++ b/libs/sofia-sip/libsofia-sip-ua/su/su_taglist.c @@ -485,8 +485,9 @@ tagi_t *t_filter(tagi_t *dst, size_t d = 0; for (f = filter; f; f = t_next(f)) { - if (TAG_TYPE_OF(f)->tt_filter) - d += (size_t)TAG_TYPE_OF(f)->tt_filter(NULL, f, src, bb); + tag_type_t tt_f = TAG_TYPE_OF(f); + if (tt_f->tt_filter) + d += (size_t)tt_f->tt_filter(NULL, f, src, bb); else if (tt == f->t_tag) { d += t_len(src); *bb = (char *)*bb + t_xtra(src, (size_t)*bb);