In a criminal case, it is very important that attorney-client privilege is protected. When it isn't, it can ruin your case. Depending on how the information gets out, your attorney may be able to use the leak to your benefit, however.
For example, look at this case in Connecticut. A woman's home was searched after the death of her husband. During the investigation, documents were seized, some of which included a folder labeled "Criminal Defense Attorney." Knowing that these documents were between an attorney and their client, they, by law, should have been protected against seizure.
The defense for the woman asked that the case be dismissed since her constitutional rights were violated and that there were few ways to guarantee a fair trial moving forward.
The judge agreed that some protected documents had been seen by state police and the prosecution. As a result, the prosecution had to be moved out of the New Britain Judicial District. On top of that, the state police who were investigating the case were banned from continuing to do so. With those changes, the judge believed that the information that had been seen before would be of little consequence to the case since new agencies would have no knowledge of the documents.
When it comes down to your rights, you must do all you can to protect information about your case. What you say to your attorney is privileged. If someone steals privileged information or uses it despite it being a violation of your rights, it's important for your defense team to bring this to a judge's attention.