Fixed memory leaks in regcomp() calls.