fixing leaks in freetds code