[PATCH 4.9 22/86] virtio_ring: fix num_free handling in error case