[PATCH 2/5] unqual: unqualify_type() should check for null ctypes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It's possible that the input type is NULL, so add a check for it.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 evaluate.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/evaluate.c b/evaluate.c
index c39f9ec73da9..fd84205c7f2c 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -63,6 +63,8 @@ static inline int valid_subexpr_type(struct expression *expr)
 
 static struct symbol *unqualify_type(struct symbol *ctype)
 {
+	if (!ctype)
+		return ctype;
 	if (ctype->type == SYM_NODE && (ctype->ctype.modifiers & MOD_QUALIFIER)) {
 		struct symbol *unqual = alloc_symbol(ctype->pos, 0);
 
-- 
2.29.2




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux