diff.c: call regfree to free memory allocated by regcomp when necessary