Fixed segfault when TERM enviroment variable is not set.
Added in/out descriptors closing in case of error in tb_init() (I'm not sure if that is needed at all, since after failed initialization there is nothing else to do as just fail and exit, but it wont hurt to be on safe side :))
Fixed segfault when TERM enviroment variable is not set. Added in/out descriptors closing in case of error in tb_init() (I'm not sure if that is needed at all, since after failed initialization there is nothing else to do as just fail and exit, but it wont hurt to be on safe side :))