Haneef's judgment did not come from a Australian court. It came from govt. dropping the case till more investigation were done.
In case of Madhani the aquital is based on lack of proof provided to the court even when tons exist in public domain. This is the govt. prosecutions role which deliberately let Madhani go