Free QR only if allocated