A Virginia man accused of shooting someone was mistakenly released not long after being arrested, police said.