On zero-divisor graphs of finite rings