device: Fix an inbalance ref/unref of network objects