rdataset was used instead of the ttl from the sig record. Also found and fixed an unchecked memory allocation.