Lindsay Lohan has avoided going to jail after a judge ruled that a booze ban forced on the star had expired when she allegedly failed an alcohol test last week.

Lohan appeared in court yesterday after being caught drinking at her home in Venice, California, while on house arrest – due to end next week. 

Officials at the Los Angeles County Probation Department asked the judge to put her in jail, but the judge said that the alcohol ban had expired before the booze test was carried out.

However he did slam Lohan for having a rooftop barbecue, calling the move "bad judgment".

He banned the actress from having any further parties while on house arrest.

Lindsay Lohan starts house arrest for theft

Lindsay Lohan faces jail over jewellery theft

Lindsay Lohan was put on house arrest for 35 days after she was accused of stealing a necklace from a jewellery shop.

She had pleaded no contest to a misdemeanour charge.