network: Use g_autoptr for unref code

11 jobs for network-autofree in 2 minutes and 59 seconds (queued for 3 seconds)