HomeFreeBSD

Fix potential memory leak.

Description

Fix potential memory leak.

Moving the allocation forward, just before it's actually needed, seems
sensible.
Add newline character at the last line while here.

Reported by: pluknet
Differential Revision: https://reviews.freebsd.org/D10974

Details