SmallFix: free the handler in GetIpFromDevice()