coverity: free gw when not used

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>