Platform: RSS: Free request only after sending error

In error cases, the request struct was freed before serializing the
error message. The serialize function correctly handles the case where
req is null, but in this case it was a pointer to invalidated memory.

In practice this did not cause any issue because the free function only
adds the memory back to the allocation list and no further allocations
were made, but it was bad practice, so this patch fixes it.

Signed-off-by: Jamie Fox <jamie.fox@arm.com>
Change-Id: I512b9766812e468de890630773fb749c69b827ee
1 file changed