If regex_compile() fails, free the regexp before doing anything else in case failure reason is "out of memory". Feedback to the user is highly likely to panic or crash after memory runs out; this should let the regex failure message be issued and the game continue. User sound regular expressions were never freed. This frees them when FREE_ALL_MEMORY is enabled.