Update thinLoggerMT.c

Fixed the bug, if function returns due to error, but mutex still locked. Fore more details visit http://www.codeproject.com/Messages/4913847/A-question.aspx