type_to_str: fix a crashing bug
commit550ba8ac5bbd08f2f3e64a355d283b0950e86cfc
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 22 Apr 2015 15:43:04 +0000 (22 18:43 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Wed, 22 Apr 2015 15:43:04 +0000 (22 18:43 +0300)
treeaabc0de9228151f26ce2827e8d7f0f23adeb97e0
parent9825508e3a074b5305e6bc1ff882cb70426b415d
type_to_str: fix a crashing bug

We end up referencing freed memory and it segfaults.

I am unhappy with reverting this code but I also just want to fix it in a
hurry.  It's not totally clear how this even happens.  I feel like it
means there are other bugs in here.

I'm unhappy generally with the inconsistent way strings are allocated and
freed in smatch.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_type.c