Created attachment 1366 [details] fix for the bug if anything goes wrong and Fwd was filled then listen_host/connect_host are not freed. patch attached.
Created attachment 1369 [details] fixed version of the patch. The previous one wasn't complete. in the first patch, I forgot to memset() local 'fwd' variable before checking listen_host and connect_host for non-NULL value.
fix applied - thanks
Fix shipped in 4.9/4.9p1 release.