Fix a memory leak in an error case in libctf.
Submitted by: Tom Rix <trix@juniper.net> MFC after: 1 week