Variable `rev_pattern` can be removed.
```c
mr_pattern = reverse_text(pat);
mr_pattern_allocated = TRUE;
```