format_full_headers: Avoid possible memory leak

The variable could be allocated, but not always freed.