Check replist is not NULL before calling DetectReplaceFree().

Since it is often the case that replist is NULL, it is not worth
calling the function before checking, since the first thing the function
does is check for NULL.

This gives a 4% speed up in one test.